Some of Cuiloa's most important API endpoints rely on very hefty psql queries that can be cleaned up by pulling out common patterns into views.
Description
Aggregating data across transactions and IBC identifiers currently requires heavy self-joining of the cometbft schema used by the cometbft indexer. This results in large sql queries that can be messy and with poor performance. While Penumbra's builtin indexer should significantly improve this situation, it may still be useful to spin out helper views to improve query readability and performance until the builtin indexer lands.
Summary
Some of Cuiloa's most important API endpoints rely on very hefty psql queries that can be cleaned up by pulling out common patterns into views.
Description
Aggregating data across transactions and IBC identifiers currently requires heavy self-joining of the cometbft schema used by the cometbft indexer. This results in large sql queries that can be messy and with poor performance. While Penumbra's builtin indexer should significantly improve this situation, it may still be useful to spin out helper views to improve query readability and performance until the builtin indexer lands.