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

[Feature]: Materialized database views for canonical chains #1170

Open
cylewitruk opened this issue Dec 19, 2024 · 0 comments · May be fixed by #1171
Open

[Feature]: Materialized database views for canonical chains #1170

cylewitruk opened this issue Dec 19, 2024 · 0 comments · May be fixed by #1171
Assignees
Labels
sbtc signer binary The sBTC Bootstrap Signer.

Comments

@cylewitruk
Copy link
Member

cylewitruk commented Dec 19, 2024

Feature - Materialized database views for canonical chains

1. Description

Instead of recursively walking the blockchains in real-time for many of our queries, we should materialize the data after the processing of each Bitcoin block so that queries can use the materialized "view" instead of recursive CTE's.

This ticket primary refers to the SQL side of things -- separate tickets should be created for individual query optimizations.

1.1 Context & Purpose

In production, we have a lot of signers consistently reporting slow queries (see the slow-query-stats dashboard in cloudwatch). But in general, we have two queries which have an average slow-query reported time of 3s, and several others which often report closer to 1s, which are run often.

@cylewitruk cylewitruk added the sbtc signer binary The sBTC Bootstrap Signer. label Dec 19, 2024
@cylewitruk cylewitruk added this to the sBTC: Release polish milestone Dec 19, 2024
@cylewitruk cylewitruk self-assigned this Dec 19, 2024
@cylewitruk cylewitruk added this to sBTC Dec 19, 2024
@github-project-automation github-project-automation bot moved this to Needs Triage in sBTC Dec 19, 2024
@cylewitruk cylewitruk moved this from Needs Triage to In Progress in sBTC Dec 19, 2024
@cylewitruk cylewitruk moved this from In Progress to In Review in sBTC Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sbtc signer binary The sBTC Bootstrap Signer.
Projects
Status: In Review
Development

Successfully merging a pull request may close this issue.

1 participant