Skip to content

Add index verification for new time-series tables in scripts/verify_indexes.sh #50

Description

@christabel888

Context: scripts/verify_indexes.sh already exists and presumably checks existing tables -- extend it to cover the new tables from #45-#47.

Where:

  • scripts/verify_indexes.sh (and .ps1 Windows equivalent, both exist in scripts/)

What to do:

Suggested approach:

  1. Extend scripts/verify_indexes.sh (and the .ps1 Windows equivalent, keep them in sync) with checks for the new tables from Design and migrate time-series schema for daily network metrics #45-Design and migrate time-series schema for wallet balance history #47.
  2. Confirm the indexes the migrations actually created match what Add /api/v1/network/daily-active-accounts time-series endpoint #15-Add /api/v1/network/fee-trends endpoint #19/Add /api/v1/soroban/active-contracts endpoint #21-Add /api/v1/soroban/top-contracts and /new-deployments endpoints #24/Add /api/v1/wallets/{address}/balance-history endpoint #26 actually query -- run EXPLAIN/EXPLAIN ANALYZE on the real queries, don't just check the index exists in the schema.

Watch out for:

  • An index that exists but isn't used by the query planner (wrong column order, wrong type) gives you false confidence -- verify usage, not just existence.

Definition of done:

  • verify_indexes.sh checks the new tables
  • No missing-index warnings on the new query patterns

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions