Skip to content

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

@cylewitruk

Description

@cylewitruk

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Needs Triage

Relationships

None yet

Development

No branches or pull requests

Issue actions