Compressing Market Data: zstd vs gzip
Distinct prices per name, and how often each one repeatsranking ·
2026-09-28 · 5×3
One session of trade prints, five household namesranking ·
2026-09-28 · 5×3
Uncompressed footprint of five names as retention growsranking ·
2026-09-28 · 6×2
AAPL trade counts and distinct prices per quarter hourseries ·
2026-09-28 · 64×3
How to Store Market Data PCAPs: Split, Compress
Retention arithmetic for a 2 TB per day feed at three compression ratios (illustrative inputs)series ·
2026-09-17 · 3×4
Distinct prices per name, and how often each one repeats
Distinct prices per name, and how often each one repeats
| ticker | distinct_prices | trades_per_distinct_price |
|---|---|---|
| NVDA | 22709 | 88 |
| KO | 5963 | 40 |
| AAPL | 19272 | 36 |
| SPY | 19530 | 25 |
| MSFT | 33101 | 12 |
the exact SQL behind every number
SELECT
ticker,
countDistinct(price) AS distinct_prices,
toUInt32(round(count() / countDistinct(price))) AS trades_per_distinct_price
FROM global_markets.stocks_trades
WHERE ticker IN ('AAPL', 'MSFT', 'NVDA', 'SPY', 'KO')
AND sip_timestamp >= toDateTime64('2026-09-15 04:00:00', 9, 'UTC')
AND sip_timestamp < toDateTime64('2026-09-16 04:00:00', 9, 'UTC')
GROUP BY ticker
ORDER BY trades_per_distinct_price DESC
More from this analysisCompressing Market Data: zstd vs gzip
Uncompressed footprint of five names as retention grows
ranking 6×2
→
One session of trade prints, five household names
ranking 5×3
→
AAPL trade counts and distinct prices per quarter hour
series 64×3
→
Retention arithmetic for a 2 TB per day feed at three compression ratios (illustrative inputs)
series 3×4
→
See all 3,293 queries →