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

added indexes and removed aggregate functions #231

Closed
wants to merge 2 commits into from

Conversation

ClaytonNorthey92
Copy link
Contributor

added indexes to btc_blocks_can materialized view, no longer using aggregate functions

Summary
performance improvements for l2 keystones by finality

Changes
added indexes to btc_blocks_can materialized view, no longer using aggregate functions

without pasting the entire query plan, this reduces the query to the following (a high cost, but fast):

(cost=19.64..85167.78 rows=394 width=242) (actual time=81.977..81.990 rows=1 loops=1)

prior, it was so long that I could not run analyze

 Nested Loop Left Join  (cost=51725.76..472025135.82 rows=394 width=242)

added indexes to btc_blocks_can materialized view, no longer using aggregate functions
@ClaytonNorthey92 ClaytonNorthey92 requested a review from a team as a code owner August 26, 2024 21:37
@github-actions github-actions bot added the area: bfg This is a change to BFG (Bitcoin Finality Governor) label Aug 26, 2024
@ClaytonNorthey92
Copy link
Contributor Author

fixes #230

@ClaytonNorthey92 ClaytonNorthey92 deleted the clayton/no-aggs branch October 23, 2024 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: bfg This is a change to BFG (Bitcoin Finality Governor)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant