---
title: "Replacing the HDB: ClickHouse for historical ticker data"
description: "ClickHouse can serve as the historical tier (HDB) of a market data system, a low-risk place to adopt a new database."
url: "https://swe.quest/articles/replacing-the-hdb-clickhouse-for-historical-ticker-data-cd7a8f768807547b"
canonical: "https://clickhouse.com/blog/historical-ticker-data"
source: "ClickHouse"
published: "2026-07-15"
difficulty: "medium"
kind: "How-to"
reading_minutes: 19
tags: ["analytics","sql","databases","performance"]
---

# Replacing the HDB: ClickHouse for historical ticker data

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2026-07-15, 19 min read, How-to. Original: [https://clickhouse.com/blog/historical-ticker-data](https://clickhouse.com/blog/historical-ticker-data)

## Summary

ClickHouse can serve as the historical tier (HDB) of a market data system, a low-risk place to adopt a new database. Its columnar storage with dictionary, delta and run-length encodings plus ZSTD/LZ4 compresses tick data well. A worked example loads one month of Binance USD-M futures data (373M trades and about 2B quotes) with clickhouse-local, reading zipped CSVs directly. Plain SQL then handles trading-desk queries: VWAP, hourly OHLC candles and minute-level drill-downs run in tens of milliseconds, and ASOF JOIN matches each trade to the prevailing quote to measure slippage during a sell-off.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)
- [SQL](https://swe.quest/tags/sql.md) (Languages)
- [Databases](https://swe.quest/tags/databases.md) (Data & databases)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)

## Prerequisites

- SQL basics ([easy posts on SQL](https://swe.quest/tags/sql.md?difficulty=easy))
- columnar databases ([easy posts on Databases](https://swe.quest/tags/databases.md?difficulty=easy))
- market data concepts

## Keywords

ClickHouse, clickhouse-local, Binance, ASOF JOIN, MergeTree, VWAP, ZSTD, DoubleDelta

## Related posts

- [NYC Meetup Report: Large Scale Financial Market Analytics with ClickHouse (Bloomberg)](https://swe.quest/articles/nyc-meetup-report-large-scale-financial-market-analytics-with-clickhouse-269ed023b1feda87.md): ClickHouse · 2022-12-06 · Easy · 3 min read · Analytics & OLAP, Databases, Payments & fintech
  Bloomberg's Structured Products team uses ClickHouse to power a Terminal application where a few users run interactive filter-and-group queries across roughly 100 million securities.
- [Trade secrets: How Coinhall uses ClickHouse to power its blockchain data platform](https://swe.quest/articles/trade-secrets-how-coinhall-uses-clickhouse-to-power-its-blockchain-data-platform-a19f7fb99396fe78.md): ClickHouse · 2024-08-14 · Easy · 5 min read · Analytics & OLAP, Databases, Performance engineering, Cost optimization
  Coinhall, an omnichain trading terminal aggregating swap data from 23 blockchains, moved from BigQuery (about 2-second queries, thousands of dollars per month) to QuestDB and then to self-hosted ClickHouse.
- [Longbridge Technology simplifies their architecture and achieves 10x performance boost with ClickHouse](https://swe.quest/articles/longbridge-technology-simplifies-their-architecture-and-achieves-10x-e3a982c02b6e4b33.md): ClickHouse · 2025-03-17 · Medium · 8 min read · Analytics & OLAP, Databases, PostgreSQL, Payments & fintech
  Longbridge, a Singapore online brokerage, replaced a fragmented market-data stack of PostgreSQL (historical), Redis (real-time) and DynamoDB (high-write) with ClickHouse after evaluating it against TimescaleDB and TDengine for write throughput, Decimal support, time functions and aggregations.
- [How Bullet uses ClickHouse Cloud to give DeFi's fastest exchange real-time analytics](https://swe.quest/articles/how-bullet-uses-clickhouse-cloud-to-give-defi-s-fastest-exchange-real-time-2e306d9fa945673c.md): ClickHouse · 2026-07-15 · Medium · 9 min read · Analytics & OLAP, Data pipelines, Databases, Payments & fintech
  Bullet, a Rust-based DeFi perpetuals exchange running as an app-specific rollup on Solana with ~500μs p50 order processing, indexes 150M+ rows per hour of sequencer events into ClickHouse Cloud for trade history, real-time analytics and monitoring.
- [Behind the music: How Chartmetric is scaling music analytics with ClickHouse](https://swe.quest/articles/behind-the-music-how-chartmetric-is-scaling-music-analytics-with-clickhouse-8636babde296e87c.md): ClickHouse · 2026-01-08 · Medium · 7 min read · Analytics & OLAP, Performance engineering, Databases, SQL
  Chartmetric moved time-series and playlist workloads from Postgres and Snowflake to ClickHouse Cloud, cutting RDS storage from 28 TB to 18 TB and bringing queries that timed out at 60 seconds down to under 3 seconds.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
