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

fix: signerDB index improvements #5811

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Conversation

hstove
Copy link
Contributor

@hstove hstove commented Feb 6, 2025

This PR adds a few new indexes for queries that weren't "perfectly" indexed. For example, queries that didn't have an explicit descending compound index would still result in inefficient scans.

I've confirmed that these indexes will help via running EXPLAIN QUERY PLAN, but I haven't proven that this will "fix" the growing IOPS issue we see in production instances. For that, I think we'll want to test this out on a live signer with a larger DB.

@hstove hstove requested review from a team as code owners February 6, 2025 22:20
@hstove hstove force-pushed the feat/signer-indexes branch from b13de1d to 6405b3a Compare February 6, 2025 22:21
@hstove hstove requested review from obycode, kantai and jferrant February 6, 2025 22:21
@hstove hstove linked an issue Feb 6, 2025 that may be closed by this pull request
@@ -545,9 +559,14 @@ static SCHEMA_7: &[&str] = &[
"INSERT OR REPLACE INTO db_config (version) VALUES (7);",
];

static SCHEMA_8: &[&str] = &[
CREATE_INDEXES_8,
"INSERT OR REPLACE INTO db_config (version) VALUES (8);",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realized when looking over the DBs, that this still doesn't do what we intended, to only have one entry in the db_config table.

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

Successfully merging this pull request may close these issues.

Unknown signer issue resolved by resetting the database
2 participants