Skip to content

Continuous-aggregate OHLC rollups #100

Description

@Miracle656

Background

Computing candles on the fly is expensive. Materialized/continuous aggregates give fast OHLC queries at scale.

What to build

Add continuous aggregates (TimescaleDB hypertable + continuous aggregate, or scheduled materialized views) for 1m/1h/1d OHLC, with a refresh policy and a query endpoint that reads the rollup.

Key files

  • prisma/schema.prisma / sql/ migrations
  • src/api/candles.ts

Acceptance criteria

  • Rollups refresh incrementally
  • Candle endpoint reads the aggregate, not raw rows
  • Benchmark shows the speedup vs on-the-fly

Drips Wave · Complexity: Advanced · 200 points

Activity

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

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions