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

Add index to maturity_height in siacoin_elements #46

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

chris124567
Copy link
Member

Most of the debug logs warning about slow queries are about a particular query in updateMaturedBalances.

SELECT address, value FROM siacoin_elements WHERE maturity_height = ?

By adding an index on siacoin_elements(maturity_height) we can speed this up substantially.

@chris124567 chris124567 changed the title Add index to maturity_height in siacoin_elements Add index to maturity_height in siacoin_elements Jun 17, 2024
@chris124567 chris124567 requested a review from n8maninger June 17, 2024 19:56
@n8maninger n8maninger merged commit 0a4aed1 into master Jun 17, 2024
6 of 7 checks passed
@n8maninger n8maninger deleted the add-maturityheight-index branch June 17, 2024 21:02
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.

2 participants