Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Performance]Test status-go DB pool #10611

Closed
Tracked by #10558
alexjba opened this issue May 10, 2023 · 4 comments
Closed
Tracked by #10558

[Performance]Test status-go DB pool #10611

alexjba opened this issue May 10, 2023 · 4 comments
Assignees
Milestone

Comments

@alexjba
Copy link
Contributor

alexjba commented May 10, 2023

Description

Test if a db connection pool (with max 1 open connection each) would work with sqlcipher as described here (https://turriate.com/articles/making-sqlite-faster-in-go)

https://www.notion.so/Database-related-performance-1dbaa7ea894c461d885e55676683be07?pvs=4#4c7aa5c9b7174b399950d1e792dee996

@alexjba alexjba added this to the 0.13 milestone May 10, 2023
@alexjba alexjba self-assigned this May 10, 2023
@alexjba alexjba moved this to In Progress in Status Desktop/Mobile Board May 10, 2023
@alexjba
Copy link
Contributor Author

alexjba commented May 10, 2023

Relates to #10558

@alexjba alexjba changed the title Test status-go DB pool [Performance]Test status-go DB pool May 10, 2023
@alexjba
Copy link
Contributor Author

alexjba commented May 16, 2023

Test 1

MacOs, M1 Pro, 64GB Ram

Test info: 
DB file 12,16 GB on disk;
Query: SELECT id, mentions FROM user_messages LIMIT ", max_rows
user_messages size:  234329 rows 
Screenshot 2023-05-16 at 17 32 30 image

@alexjba
Copy link
Contributor Author

alexjba commented May 16, 2023

Code used for benchmarking:
https://github.com/alexjba/go-sqlcipher-dbpool

@alexjba alexjba closed this as completed May 16, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Status Desktop/Mobile Board May 16, 2023
@alexjba
Copy link
Contributor Author

alexjba commented May 17, 2023

Limitations:
Writing needs to be done on a dedicated connection. Otherwise we could get database is locked or table is locked errors on write.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

1 participant