Workload and Query Inventory
The queries, dashboards and APIs that read the source, how often, over what time range and with what latency expectation. This sets the table design more than the source schema does.
ClickHouse Migration
Last reviewed by Tyler Eastridge
AceMQ plans and runs migrations of analytics workloads to ClickHouse from PostgreSQL, Elasticsearch, Druid and cloud warehouses. We start with the queries you need to keep fast, design the tables around them, load and sync the data with the route that suits your source, check the results against the old system, and cut over with the old platform still running. A lift-and-shift of the source schema is where ClickHouse migrations go wrong, so that is where we begin.
Is This You?
Analytical queries on PostgreSQL are slowing the application database, or the reporting replica cannot keep up
An Elasticsearch cluster built for logs or events costs more each quarter, and most of the queries are filters and aggregations
A warehouse bill is driven by a few high-volume event tables that need fast, repeated, interactive queries
A proof of concept loaded a copy of the source schema into ClickHouse and the dashboards were not fast
Kafka already carries the events, and the question is what sits at the end of the topic
You are choosing between self-managed ClickHouse and ClickHouse Cloud and want the operating differences written down
Outcomes
Concrete state changes, not deliverable counts. This is what actually differs about your ClickHouse estate when the engagement closes.
Before
The case for ClickHouse is a benchmark on someone else's data.
A short list of your own queries, with the ones that must stay fast, the access patterns behind them and a table design for each.
Before
The proof of concept copied the source tables column for column.
Tables designed around the sorting key, data types and aggregation your queries need, loaded with real data and timed.
Before
Validation is a row count and a dashboard that looks about right.
Counts, key-range aggregates and the results of your real queries compared between source and ClickHouse, with a stated tolerance for approximate functions.
Before
The cutover is a switch with no way back.
The old platform kept running and fed in parallel until the numbers match, then a cutover with a defined rollback and a retirement date for the old system.
Scope
The queries, dashboards and APIs that read the source, how often, over what time range and with what latency expectation. This sets the table design more than the source schema does.
MergeTree family choice, ORDER BY, data types, low-cardinality and nullable columns, partitioning only where it earns its place, and how late updates and deletes are modelled.
A bulk load, or an initial snapshot followed by continuous change capture: ClickPipes or PeerDB from PostgreSQL, a Kafka topic from Debezium or an existing pipeline, or files through object storage.
Counts and aggregates over key ranges, a replay of your top queries on both systems, and a written rule for where results differ by design, such as approximate distinct counts.
Dashboards and services moved one at a time while the source keeps feeding, a rollback at each step, and a date on which the old system stops.
Self-managed or ClickHouse Cloud, shard and replica layout, ClickHouse Keeper, backups, monitoring, version policy, and optional 24/7 support from the team that did the move.
The Engagement
Every phase has a defined duration and a concrete artifact handed over at the end of it. You always know what stage you're in and what you've received.
We read the source, its query load and its growth, and decide which workloads belong in ClickHouse at all. Delivery is remote and guided by your engineers, with access scoped to what each phase needs. The output may be a plan to move one workload, or a recommendation to stay put.
You receive
One representative workload is modelled, loaded and queried against real data. The sorting key, types and aggregation are adjusted until the queries that matter behave, before the rest of the estate is committed.
You receive
Data is loaded and kept in sync while the old platform stays in service. Validation runs continuously, and consumers are repointed one at a time against agreed checks.
You receive
Each consumer moves with a rollback decision written in advance. We stay engaged until ClickHouse is stable under real load, then hand over runbooks, dashboards and alerts, or move the platform onto support.
You receive
ClickHouse's own migration guides cover PostgreSQL, BigQuery, Snowflake, Elasticsearch and Redshift, with remoteSecure, backup and restore, clickhouse-local, ETL tools and object storage as other routes. The tools move rows. What differs by source is what has to be redesigned.
| Source | Ways to move the data | Where the effort concentrates |
|---|---|---|
| PostgreSQL | Real-time CDC through ClickPipes (ClickHouse Cloud) or PeerDB (self-managed ClickHouse), or a bulk load with periodic updates, as ClickHouse's migration guide documents. Debezium into Kafka when a stream already exists. | Replacing row-level updates with a table design that handles them, keeping a pooler out of the CDC path, wide tables built from joins, and deciding which tables belong in ClickHouse at all. |
| Elasticsearch | Export through object storage or an ETL tool, or a re-ingest from the Kafka topic that fed the cluster. Sources of truth are often in the topic or a database, not the index. | Mapping fields to typed columns, nested and array fields, time-series retention, and the queries that use relevance scoring or fuzzy matching, which have no direct equivalent. |
| Apache Druid | Re-ingest from the original stream or files. If the raw events are gone, extracting from Druid with queries is scoped as its own step. | Rollup and pre-aggregation moved into the table design or materialized views, and the query language change from Druid SQL or native JSON. |
| BigQuery, Snowflake, Redshift | Follow ClickHouse's migration guide for each warehouse. Object storage or an ETL tool is the usual transport. | SQL dialect differences, semi-structured columns, scheduled transformations, and the permission model that sat in the warehouse. |
| Files and streams | Object storage, clickhouse-local, or a consumer on a Kafka topic. | Idempotent loading, schema evolution of the incoming events and what happens to late data. |
ClickHouse stores a table as parts sorted by the ORDER BY key and reads it through a sparse primary index over blocks of 8,192 rows, called granules. The key you choose decides which queries skip data and which scan it. ORDER BY also sets the primary key unless you say otherwise. Copy a relational schema and the key becomes an afterthought, which is how a fast database ends up with slow dashboards.
Where the cost sits
Moving the rows takes the least time. The cost is in the table design and in the queries and dashboards that must be rewritten for it. That is why we model and load one workload end to end before committing to a plan for the rest.
A one-time bulk load is enough when the source can be frozen for the copy, or when the history is loaded once and only new events arrive afterwards. When the source keeps changing, you need change data capture.
For PostgreSQL, ClickHouse's documentation describes CDC through ClickPipes for ClickHouse Cloud and through PeerDB for self-managed ClickHouse as the most efficient route for most migrations. ClickPipes takes an initial snapshot and then replicates continuously, with a default sync interval of 60 seconds. The source needs logical replication enabled and a replication user. Poolers and proxies such as PgBouncer, RDS Proxy and Supabase Pooler are not supported in the CDC path, so the connection goes to the database host itself. A pipe must be paused to be updated, and only some settings can change after creation, which is why settings are chosen on the rehearsal.
When a Kafka topic already carries the events, ingesting from the topic is usually cleaner than copying from the source database, because the same stream can feed the old and new platforms during the parallel run. The same applies to Debezium topics from a relational source.
| Question | Self-managed ClickHouse | ClickHouse Cloud |
|---|---|---|
| PostgreSQL CDC tool | PeerDB, as ClickHouse's migration guide documents for on-prem ClickHouse. | ClickPipes, which replicates into ClickHouse Cloud. |
| Who runs replication, backups and upgrades? | You, or a support or managed provider, on your infrastructure or ours. | The service, within its own limits. Settings and versions follow the service. |
| What stays with you either way? | Table design, sorting keys, ingestion, queries and cost of reads. | The same. |
| How do you leave? | Your data and your files. Nothing to exit. | Export to object storage or replicate out. Check the route before committing. |
For self-managed estates the target version matters. ClickHouse versions are numbered by year and month, a stable release comes about monthly, the three latest stable releases receive backported fixes, and an LTS is released twice a year and supported for a year. As of 4 November 2026 the LTS lines are 26.3 and 26.8, and the latest release is 26.10. A migration target is chosen on that rule, with the upgrade cadence agreed before go-live rather than after the first release falls out of support.
ClickHouse Cloud plan and pricing questions are answered from the vendor's own pages during the assessment. AceMQ is independent of ClickHouse Inc. and does not resell the service.
Typical engagements
Typical engagement scenarios: what the work covers and what it delivers. They describe the service, not past results.
Adtech Measurement Platform
Resolving ingestion failures where frequent small inserts produced parts faster than background merges could retire them, tripping the parts limit.
Cybersecurity Analytics Provider
Ongoing support for ReplicatedMergeTree clusters covering replication queue stalls, memory limit failures on large queries, and mutation backlogs.
Industrial IoT Platform Operator
Redesigning ORDER BY keys, partitioning, codecs, and materialized views so dashboard queries read a small fraction of the data instead of full scans.
Financial Market Data Provider
Assessment of shard and replica topology, storage tiering, query concurrency limits, and merge behavior ahead of a significant data volume increase.
FAQ
With change data capture. ClickHouse's migration guide describes ClickPipes for ClickHouse Cloud and PeerDB for self-managed ClickHouse: an initial snapshot, then continuous replication, while PostgreSQL keeps taking writes. The source needs logical replication enabled, and a connection pooler cannot sit in the CDC path. We rehearse the load and the lag before any consumer moves.
You can copy it, but the result is usually slow. ClickHouse reads data through the ORDER BY key, so the table has to be designed around the queries rather than around the source structure. We model one workload first, load real data and time the queries that matter before committing to the rest.
For log and event analytics that are mostly filters and aggregations, often yes. For workloads built on relevance scoring, fuzzy search and highlighting, no. The assessment sorts your queries into those two groups, and may leave part of the workload where it is.
It changes the tooling and who operates the cluster. ClickPipes targets ClickHouse Cloud and PeerDB suits self-managed ClickHouse, according to ClickHouse's guide. Table design and query cost stay with you either way. We lay out the differences for your case, and AceMQ supports self-managed estates under 24/7 support or managed operation.
AceMQ delivers the migration with partner data platform specialists, working remotely with your engineers and agreeing access phase by phase. Afterwards you can run ClickHouse yourselves, put it under 24/7 ClickHouse support, or have it operated for you on your infrastructure or ours.
Let's talk
Tell us the source (PostgreSQL, Elasticsearch, Druid or a warehouse), the data volume and the queries that must stay fast. We will reply within 1 hour and follow with an assessment plan and a written quote.
Send us a message and we'll follow up within 1 hour — or book a free 30-min consultation directly.
305-204-2607info@acemq.comPrefer to talk now? Call us directly or use the consultation tab to find a time that works.