Every Chain Group in ChainStream GraphQL accepts two optional parameters that control which underlying tables are queried. These parameters let you optimize for freshness, query speed, or data completeness depending on your use case.
The dataset parameter controls the time scope of the data being queried. It determines whether the query hits real-time tables, archive tables, or both.
Value
Description
Typical Use Case
combined
Queries both real-time and archive data (default)
General-purpose queries where you need the full range
realtime
Only recent data (approximately the last 24 hours)
The aggregates parameter controls whether the query uses pre-aggregated materialized views (DWM layer) instead of raw detail tables (DWD layer). Pre-aggregated tables contain pre-computed rollups (typically per-minute) that are significantly faster to query.
Value
Description
Typical Use Case
yes
Prefer pre-aggregated tables when available (default behavior)
dataset: realtime queries a smaller table partition, resulting in faster response times for monitoring use cases.
Use aggregates for analytics
aggregates: yes or only leverages pre-computed rollups that are orders of magnitude faster than scanning raw event tables.
For the fastest possible OHLC or volume queries, combine dataset: realtime with aggregates: only. This targets the smallest, most optimized data slice.