Is self-hosted ClickHouse cheaper than BigQuery cost for your workload?
Whether self-hosted ClickHouse costs less than BigQuery depends on three things: how many bytes your queries scan, how often they run, and what your platform staff cost to operate. If your BigQuery bill grows with every dashboard refresh and ad hoc query, the scan pattern is the first thing to measure. Google's BigQuery pricing lists on-demand queries at $6.25 per TiB after the first 1 TiB each month, and storage at no charge for the first 10 GiB each month, with the rest billed by the GiB. Capacity pricing through BigQuery editions is billed per slot-hour instead, so ask which model your current contract uses before comparing. Pull the bytes-billed figures from your job history for a typical month and multiply by the rate on your current price sheet, rather than relying on an average.
ClickHouse server is licensed under Apache-2.0, so there is no per-query or per-TiB license line in a self-hosted design. The cost moves to infrastructure and people: servers and disks sized for your data and peak concurrency, a replica set with ClickHouse Keeper, off-cluster backups, network egress, monitoring, upgrades, and the engineers who own them. Also count the one-time work of redesigning sort keys and partitions and rewriting GoogleSQL, which is a project cost rather than a monthly one. Ask any managed or implementation partner for a quote that separates these items, so you can see which ones recur and which change with data growth. A fixed-capacity cluster often favors heavy, repeated scans of large event tables, where per-TiB pricing grows quickly. BigQuery often remains cheaper for occasional, small or unpredictable workloads, and for teams that do not want to run a database. Model both sides with your own query log before deciding.
Which cost components each side carries
This table sets each BigQuery charge against the matching ClickHouse cost, with whether it is one-time or recurring and what drives it. Read the BigQuery column for what Google bills and the ClickHouse column for what your team must buy, run and staff. The main takeaway is that ClickHouse moves cost from per-query metering to fixed infrastructure and people, so query volume and data layout matter far more on the BigQuery side.
| Cost component | BigQuery (Google Cloud) | Self-hosted ClickHouse |
|---|---|---|
| Software license | Included in the per-query or per-slot price, no separate license line | ClickHouse server is Apache-2.0, so no license fee; confirm any support contract terms with your vendor |
| Query or compute charges (recurring) | On-demand scanning at $6.25 per TiB after the first 1 TiB each month, or edition slot-hours; driven by bytes scanned and slot time | Servers you size and run; driven by instance count and hours, not by bytes scanned per query |
| Storage (recurring) | Billed per GB-month after the first 10 GiB free each month; driven by table size and long-term storage tiers | Disks on your servers or object storage for backups; driven by compressed data size and replica count |
| Infrastructure (recurring) | None beyond the Google Cloud bill | Compute, local disks, network and load balancers in your cloud or data center, sized to peak concurrency and data volume |
| Replication (recurring) | Managed by Google; included in the storage price | Extra replicas double or more of compute and disk, plus ClickHouse Keeper nodes, recommended at least three on dedicated hosts with about 4 GB RAM each per the ClickHouse replication guide |
| Backups (recurring) | Managed by Google; time travel and snapshot behavior should be confirmed in the pricing and docs | Backup storage for BACKUP and RESTORE to S3-compatible or Azure storage, plus spare-cluster time for restore tests the ClickHouse documentation recommends |
| Implementation and query rewrites (one-time) | Mostly limited to scheduled query and BI changes; GoogleSQL is already in use | Schema and primary key redesign, rewriting GoogleSQL, repointing pipelines; largest one-time item, driven by query count |
| Data export (one-time) | Export jobs and Cloud Storage egress or storage during transfer; confirm current export rules before planning | Load from Cloud Storage with the gcs table function; network transfer and temporary staging storage |
| Support (recurring) | Included or purchased through Google Cloud support plans; confirm tiers with Google | Internal on-call, or a retainer with a partner; cost depends on your SLA and hours of coverage |
| Upgrades and testing (recurring) | Handled by Google | Monthly stable releases and LTS releases twice a year; you need a pre-production environment and changelog review, per the ClickHouse production FAQ |
| Internal skills and staff (recurring) | Analysts and data engineers, with lower database operations effort | Database operators for capacity, replication, backups, access control and monitoring; the main recurring cost to estimate with your own salaries |
What moves the BigQuery and ClickHouse comparison
Both bills follow usage, but they follow different units. BigQuery on-demand charges for bytes scanned, while a self-hosted ClickHouse cluster charges for the hardware, disks and people you keep running, whatever the queries touch. The six drivers below show where each side gains or loses ground as your workload grows.
Bytes scanned per query
On-demand BigQuery pricing is charged at $6.25 per TiB scanned after the first 1 TiB each month, so the cost of a query depends on the columns and partitions it reads, not on its result. Wide SELECT * dashboards and queries that skip partition filters multiply the bill. On ClickHouse, the same query reads from local disk and costs nothing extra per scan, but a poorly sorted table still forces the servers to read more data and need more CPU. Ask your team to sample the ten most frequent queries and record bytes scanned for each.
Query frequency and dashboard refresh
Per-TiB pricing scales with how often a query runs, so a dashboard that refreshes every minute on a large table costs far more than a monthly report on the same table. Scheduled queries, alerting rules and embedded analytics can run around the clock without anyone asking for them. On a self-hosted ClickHouse cluster, extra refreshes consume CPU that is already paid for, up to the point where the cluster saturates. Map each scheduled job to its run count per day before you compare totals.
Hot data volume kept in place
BigQuery bills active storage monthly after the first 10 GiB, so keeping years of event data queryable costs roughly what the storage class charges, plus any scanning. On ClickHouse, every terabyte kept online needs disk on your servers, and the cost of that disk is fixed whether you query it or not. Tiering older partitions to cheaper object storage can lower the disk bill, but it changes query speed and needs its own design. Confirm the retention period each team needs before sizing disks.
Dashboard concurrency
BigQuery on-demand scales concurrency through Google's shared capacity, so many users at once generally does not add a separate charge, though scanned bytes still count. ClickHouse concurrency depends on the CPU, memory and I/O you provision, so peak hours can force a larger server or a second node. Measure peak concurrent queries and their memory use, not just daily totals. Ask whether query limits and per-user quotas are set, because a single runaway report can starve the others on a shared cluster.
Slot reservations versus on-demand
BigQuery editions sell capacity as slot-hours, which changes the cost picture from per-scan to per-reserved-capacity. A reservation makes spend predictable but can be idle when workloads are light, while on-demand is cheaper only for light, infrequent scanning. Compare your monthly bill under both models using the same query log. On the ClickHouse side, the equivalent decision is server size and count, which you buy as a fixed block and must size for the busiest hour. Revisit both choices after each large workload change.
Replicas, backups and sort-key design
ClickHouse replication uses ReplicatedMergeTree tables coordinated by ClickHouse Keeper, and the replication guide recommends at least three Keeper nodes on dedicated hosts, each with about 4 GB of RAM. Replicas double or triple the disk and compute you pay for, and backups add storage in your own object store. Because ClickHouse performance depends on the primary key and partitioning you choose, schema work is a one-time cost that can make queries much cheaper to run. Budget for the replicas, the Keeper nodes, the backup target and a restore test on a spare cluster, and ask any implementer to show how the sort key was chosen for your top queries.
ClickHouse replication guideWhy per-TiB pricing gets expensive for some query patterns
On-demand BigQuery pricing charges by the bytes a query scans, so the main cost driver is how much data each query reads, not how long it runs or how many rows it returns. The Google pricing page lists on-demand queries at $6.25 per TiB after the first free 1 TiB each month, so a query that reads a wide table costs more than a narrow one even when both return the same result. The pattern that causes most surprises is repetition: a full-table scan run once a day by a scheduled query, plus the same scan run again by each dashboard tile that refreshes, plus ad hoc exploration by analysts who run exploratory queries against the same table, multiplies scanned bytes without any single query looking expensive. A SELECT * on a wide event table is the most common amplifier, because it reads every column even when the report uses three.
Partitioning and clustering reduce scanned bytes, but they are design work that someone has to own. Partitioned tables let a query prune whole date ranges, and clustering orders blocks so filters on the clustered columns skip more data. Both only help when queries filter on the partition or cluster columns, so the reader needs to check whether dashboards and scheduled queries actually do. Each change also has a cost: a team must decide partition keys, rewrite queries and tables, and keep them correct as schemas change. Confirm the current options and limits for your table types in Google's BigQuery documentation before you commit to a design.
Measure before you model anything. Pull the bytes-billed values for the last few months of jobs from the BigQuery job history (the INFORMATION_SCHEMA jobs views are the usual source), group them by user, service account, scheduled query and dashboard, and rank the top patterns. Look at how often each pattern runs and whether its filters match the partition or cluster columns. This shows which workloads drive the per-TiB bill and gives you the scan volume that a ClickHouse sizing exercise will need to match. Use your own job history for these figures, not an estimate, because the mix of repeated scans and selective queries varies widely between organizations.
How to build the cost model with your own numbers
This sequence turns BigQuery's bills and your query history into a side-by-side estimate of a self-hosted ClickHouse cluster, so the comparison rests on your workloads rather than list prices. The output is a cost model with one-time and recurring lines that your finance and platform teams can review together.
Export BigQuery job and storage metadata
Ask your Google Cloud billing and data team to export several recent months of BigQuery job metadata and storage metadata, using the INFORMATION_SCHEMA views and billing export your organization already has. Group bytes billed by project, dataset, user, service account and scheduled query, so each workload has a monthly figure. Confirm that the export covers the same months as your invoices. The step is done when every recurring workload has a monthly bytes-billed total and a storage total that reconcile to the invoice.
Separate slot-based spend from on-demand
Identify which projects use BigQuery editions with slot reservations or autoscaling, and which still pay per TiB scanned. Slot spend is driven by reserved capacity and autoscaled hours, so model it as its own line instead of converting it to bytes. Use the rates on the Google Cloud BigQuery pricing page for your edition and region, and record the rate source and date next to each figure. The step is done when every project is tagged as on-demand, slot-based or mixed, and each slot line has a rate and a monthly quantity.
Size ClickHouse for compressed data and headroom
Measure the compressed size of your largest tables in BigQuery storage terms, then ask your platform team to estimate the on-disk footprint on ClickHouse using a sample load of representative data. Add replica copies, free space for merges, and headroom for peak query concurrency. Price the servers and disks for your chosen cloud or data center, separately from storage. The step is done when you have node count, CPU, memory, disk per node and replica count written down, with the sizing assumptions stated.
Add Keeper nodes and backup storage
Add the cost of ClickHouse Keeper for replication coordination. The ClickHouse replication guide recommends at least three Keeper nodes on dedicated hosts in production, with about 4 GB of RAM each, so include those hosts in the model. Then add backup storage for full and incremental BACKUP output in S3-compatible or Azure Blob storage, sized to your retention policy. Replication does not protect against human error, so do not leave backups out. The step is done when Keeper hosts and backup retention each have their own line item.
Cost staff time for operations and migration
Estimate the people cost for building the cluster, running upgrades, monitoring, handling restores and rewriting GoogleSQL queries and pipelines. Staff time is usually the largest line that a per-TiB comparison leaves out, and it is partly one-time (migration, query rewrites, pipeline repointing) and partly recurring (on-call, upgrades, capacity planning). Ask a partner or internal team for a written scope with these tasks listed, so the estimate is traceable. The step is done when one-time and recurring labor sit in separate rows, each tied to a named task.
Run top queries on pre-production ClickHouse
Pick the most expensive and most frequent queries from your job metadata, rewrite them for ClickHouse, and run them against a pre-production cluster loaded with representative data. Record latency, memory use, bytes read and CPU time for each query, and compare them with the BigQuery job history for the same queries. The ClickHouse production FAQ recommends a pre-production environment with representative data and queries for this reason. The step is done when each top query has a measured latency and resource profile on both platforms.
Compare totals and document assumptions
Combine the BigQuery baseline, the ClickHouse infrastructure, Keeper, backup, staff and migration lines into one table, showing one-time costs separately from recurring costs. Show how each line moves when data volume, query frequency or node count changes, and mark which numbers came from invoices, measured tests or estimates. Ask any vendor or partner for a quote that matches this line structure. The step is done when a reviewer can trace every total to a source and see which assumptions drive the result.
What a self-hosted ClickHouse cluster needs in production
A production ClickHouse setup starts with ReplicatedMergeTree tables, which keep copies of each table's data on more than one server and coordinate those copies through ClickHouse Keeper, the replacement for ZooKeeper. The replication guide recommends at least three Keeper nodes, running on dedicated hosts with about 4 GB of RAM each. Those hosts are a line item that BigQuery never shows you: they are servers you buy or rent, patch and monitor, and they exist even when query volume is low. When you size the cluster, count the Keeper nodes as a fixed cost separate from the data nodes, and confirm the current memory and host guidance in the replication documentation before you write the quote request.
Replication protects against hardware failure, not against mistakes. According to the replication guide, a recovered replica automatically syncs missing data from a healthy replica, so a failed server needs no manual repair. But a bad DROP TABLE, a faulty migration script or a corrupted partition is copied to every replica at once. The backup documentation says replication alone does not protect against human error or corruption, so you need scheduled BACKUP and RESTORE jobs writing full and incremental backups to S3-compatible object storage in a separate failure domain. Plan that storage as a recurring cost, and decide the retention period with your compliance team before you size the disks.
Backups are only useful after a restore has worked, and the ClickHouse backup documentation warns that a backup never test-restored will probably not restore properly when needed. It recommends regular restore tests on spare clusters. In practice this means a standing spare environment, or time booked on one, that restores the latest backup, runs row count and checksum comparisons against production, and confirms that queries and access rules behave as expected. Each test consumes compute, storage and engineer hours every cycle, so it belongs in the operations budget as an ongoing cost, not a one-time migration task. Ask any implementation partner to include recurring restore tests in the written scope and to show how their results are recorded.
Questions buyers ask about BigQuery and ClickHouse costs
How much effort does moving off BigQuery to self-hosted ClickHouse take?
The effort depends mostly on how many datasets, scheduled queries and BI dashboards depend on BigQuery-specific SQL and on how much of the schema needs redesign for ClickHouse. Each cost component is different: the engineering time to export and load tables, the time to rewrite GoogleSQL and to choose primary keys and partitions, the time to repoint BI tools and pipelines, and the time to validate results against BigQuery before cutover. Export itself is usually the smaller task. Ask any vendor to break its estimate into these work packages, and confirm the list of scheduled queries and dashboards in your own environment before comparing quotes.
Can our team migrate from BigQuery to ClickHouse without outside help?
Many teams can do parts of the work in-house, especially the export and the load, which ClickHouse documents through the gcs table function after a Cloud Storage export. The harder parts are schema and sort-key design for ClickHouse, rewriting GoogleSQL in queries that drive reports, and setting up replication and backups that you can restore from. Consider whether your team has people who have run a distributed database in production before. DeployOpen plans, implements, integrates, hardens, backs up and documents self-hosted platforms in your own infrastructure, and most engagements are fixed-scope with the scope and deliverables agreed in writing before work starts.
How long does the BigQuery to ClickHouse cutover take?
The duration depends on scope, and it cannot be stated responsibly without a scoped plan. The main drivers are the number of tables and the total data volume to move, how many pipelines and BI tools must be repointed, how much SQL must be rewritten and validated, and how many business users must sign off on results. A parallel run, where BigQuery and ClickHouse answer the same queries while you compare outputs, usually adds time but lowers cutover risk. Ask any provider for a written plan that lists phases, owners and the acceptance checks for each phase.
What skills does a team need to run self-hosted ClickHouse?
The team needs people who can operate a clustered database on their own servers. The core skills are Linux administration, storage and network sizing, monitoring, and upgrade planning. For replication, the ClickHouse replication guide uses ClickHouse Keeper, which the guide recommends running as at least three nodes on dedicated hosts in production, so someone must own that layer. Teams also need to design MergeTree tables with suitable primary keys and partitions, and to run restore tests, since the backup documentation warns that a backup never test-restored will probably not restore properly. Confirm these skills in your own staff before budgeting for internal operations.
Do BigQuery export limits add cost to a migration?
Export adds cost in three ways: the time to run export jobs, the Cloud Storage capacity that holds the exported files while they are in transit, and the egress or transfer charges that Google Cloud may apply when data leaves its network. BigQuery exports go only to Cloud Storage, and the 1 GB per file limit means large tables produce many files that must be managed. Check current export and egress terms in Google Cloud's pricing documentation, and confirm the total exported volume and the region of your Cloud Storage bucket against your own environment before estimating the export budget.
What should we ask a vendor for in a ClickHouse migration quote?
Ask for a written scope that names the datasets, scheduled queries, BI dashboards and pipelines in scope, and what is excluded. Request a cost breakdown into one-time work (export, schema design, query rewrites, validation, cutover) and recurring work (hosting, replication, backups, upgrades, on-call support). Ask how each component is priced and who pays for infrastructure, which should be in your own cloud account or data center. Ask for the acceptance criteria, the restore test you will receive, and how upgrades are handled, including the ClickHouse release lines you will run. Compare quotes on the same scope, not on headline totals.
Which ClickHouse versions should we run in production?
Choose a version that is still supported. The ClickHouse security policy lists 26.9, 26.8, 26.7 and 26.3 as currently supported with security updates, and all other versions as unsupported. The production FAQ recommends stable releases for most production use, a pre-production environment with representative data and queries, and reading the changelog before every upgrade, because minor backward-incompatible changes can occur. Stable releases ship roughly monthly, and LTS releases ship twice a year and are supported for a year. Confirm the current support table on the release pages before you fix a version for your plan.
Does self-hosted ClickHouse still need BigQuery-style access control?
Yes, and you must build it yourself. ClickHouse supports users, roles and row-level access rules through its access control system, and it can use external authenticators such as LDAP, Kerberos, SSL X.509 certificates, an HTTP authenticator and JWT. Map each BigQuery IAM role and dataset permission to a ClickHouse role, and test that restricted users cannot see data they could not see before. Confirm with your security team which identity provider must be the source of truth, and document the mapping as part of your audit evidence.
How the cost model fits together
The model starts with BigQuery job and storage metadata, which shows how many bytes each workload scans and how much data sits in each table. Those figures feed the export to Cloud Storage, then the sizing of a ClickHouse cluster with replicas and ClickHouse Keeper nodes on dedicated hosts. Backups and scheduled restore tests add recurring cost, and the total view adds staff time and one-time migration work. Check that each query pattern you measure in BigQuery is reflected in the ClickHouse sizing and the rewrite estimate.
Cost flow from BigQuery metadata to a combined total cost view.
How DeployOpen scopes a fixed-price ClickHouse implementation
DeployOpen plans, implements, hardens, backs up, documents and supports self-hosted open-source platforms inside your own cloud accounts, data centers or air-gapped networks. For a BigQuery cost review, that means we start from your query workload and data volumes, then agree the ClickHouse build, its tests and its handover in writing before work begins.
How we scope
- We inventory the BigQuery datasets, scheduled queries and BI dashboards that would move, with their scan volumes and run frequency.
- The written scope lists which query patterns, tables and integrations ClickHouse will serve, and which stay on BigQuery.
- Engagements are fixed-scope, so deliverables and timelines are agreed in writing before any build work starts.
How we build
- We size the ClickHouse servers, disks and Keeper nodes against your data and concurrency, then document the assumptions.
- We redesign primary keys and partitions for the dominant queries and rewrite GoogleSQL where the target dialect differs.
- We configure replication, access control and external authentication so your security team can review the setup.
How we hand over
- You receive the architecture, sizing rationale, runbooks and a cost model that separates one-time work from recurring infrastructure and staff time.
- We run a backup and restore test on a spare cluster, since ClickHouse documentation warns untested backups often fail when needed.
- We agree a pre-production comparison of results and query timings with your representative data before cutover.
How we support
- Ongoing support, version upgrades and continuous testing are available as retainers after handover.
- Upgrade planning follows the ClickHouse release lines your team chooses, with changelog review before each change.
- Ask any provider to confirm in writing which ClickHouse versions receive security updates at the time you sign.

