Skip to content

Design and migrate time-series schema for daily network metrics #45

Description

@christabel888

Context: Migrations in this repo are numbered sequentially (001_... through 030_comprehensive_seed_data.sql); this issue is the actual schema work several endpoint issues above depend on (#15-#19).

Where:

  • New migrations/031_create_network_metrics_timeseries.sql (+ down migration if following the pattern of migrations 001-002)

What to do:

Suggested approach:

  1. Design one wide table or several narrow per-metric tables for DAA/tx-count/volume/new-accounts/fee-trends -- check what shape Add /api/v1/network/daily-active-accounts time-series endpoint #15-Add /api/v1/network/fee-trends endpoint #19's queries will actually want before committing (a wide table is simpler to query for "give me everything for date X"; narrow tables are simpler to extend later).
  2. Add appropriate indexes (date column at minimum) up front, verified via Add index verification for new time-series tables in scripts/verify_indexes.sh #50.

Watch out for:

Definition of done:

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