PROVIDER - Columnar real-time analytics database
ClickHouse
ClickHouse is an Apache-2.0 columnar analytics database built on MergeTree engines and vectorized execution, with a managed ClickHouse Cloud service and ClickPipes ingestion.
Service Overview
ClickHouse is an Apache-2.0 columnar analytics database maintained by ClickHouse Inc., built to return sub-second aggregations over PB-scale detail data, which makes it a common choice for logs, event tracking and observability workloads.
The open-source distribution relies on MergeTree table engines, materialized views and replicated clusters; the managed ClickHouse Cloud runs in AWS, GCP and Azure regions, meters compute units and compressed storage separately, and bundles ClickPipes ingestion with a SQL console. It sits alongside other analytical engines in the databases category, distinguished by putting columnar storage and vectorized execution behind one SQL interface.
Key Strengths
- Columnar storage plus vectorized execution returns second-level aggregates over billions of rows on a single node.
- MergeTree engines prune data by sort key, partition and primary index, so scan volume shrinks with each filter.
- Materialized views and projections precompute recurring aggregates, so dashboards stop rescanning raw detail.
- Official clients cover Java, Python, Go, JavaScript and C# with JDBC and R2DBC drivers for JVM applications.
- The Apache-2.0 license allows self-hosting and redistribution with no license fee for the software itself.
Limitations
- High-frequency single-row updates and multi-statement transactions are not supported; writes must be batched and merged.
- A poorly chosen sort key or partition degrades to a full table scan, so schema tuning depends on anticipated queries.
- Cloud compute is metered per compute-unit hour and scales to zero when idle, so the next query waits for a cold start.
- Private networking and compute-compute separation start at the Scale plan; Basic runs a single replica.
- Public egress and cross-region traffic are billed separately, so multi-region deployments need per-cloud cost tracking.
Product Ecosystem
Open-source distribution
A complete Apache-2.0 database with source on GitHub. The MergeTree family covers MergeTree, ReplacingMergeTree, SummingMergeTree and AggregatingMergeTree engines; inserts append parts and background merges organize them, with sort keys and partitions deciding how much data each query can skip. Replication, ClickHouse Keeper coordination, backups and version upgrades are operated by your own team.
ClickHouse Cloud
A managed service in Basic, Scale and Enterprise tiers across AWS, GCP and Azure, sold at the same price through the three cloud marketplaces. Each service is replicated across availability zones by default, with automated backup and restore, an interactive SQL console, and a Terraform provider plus infrastructure APIs for provisioning. Scale and above add AWS PrivateLink, GCP Private Service Connect and Azure Private Link connectivity along with compute-compute separation.
ClickPipes ingestion
A managed ingestion layer available only in ClickHouse Cloud, streaming continuously from Apache Kafka, AWS S3, GCS, PostgreSQL, MySQL and MongoDB. After picking a source and format and adjusting the destination schema, the platform keeps the pipeline running, which removes the need for a hand-built sync job when historical and incremental data land in the same analytical store.
Clients and drivers
Official clients cover JavaScript (Node.js, browser, Cloudflare Workers, Deno), Python, Go, Java (client, JDBC, R2DBC), C#, Rust, C++ and C. The HTTP interface listens on port 8443 with TLS and 8123 without it; the default database and default user are both default, and connection details appear in the Cloud console. For a log-pipeline alternative, see setting up an ELK log analytics platform.
Adjacent product lines
The same company ships ClickHouse Managed Postgres, Observability, Agents, AI Engineering by Langfuse, Security, Bring Your Own Cloud and ClickHouse Government. After the 2026 Langfuse acquisition, LLM observability became a standalone line; the government and bring-your-own-cloud editions target customers that need dedicated regions or their own cloud accounts.
Use Cases
- Fit | Log and observability analytics: access logs, traces and security events land in daily partitions with TTL cleanup, and queries hit detail rows directly.
- Fit | Event tracking and product analytics: hundreds of millions of events aggregate instantly, with materialized views for fixed report definitions and raw detail for ad-hoc ones.
- Fit | Self-hosting with data residency: the Apache-2.0 build deploys fully inside a private network with no license fee, leaving hardware and operations as the cost.
- Evaluate | High-frequency updates and transactional workloads: multi-statement transactions are unsupported, so order and account writes must become batched appends.
- Evaluate | Large join queries: multi-table joins need the right-hand table sized against available memory and the distribution key, or they hit memory limits.
- Evaluate | Deployments aimed at mainland China: public regions exclude mainland China, so cross-border latency and data-export rules need assessment.
Pricing & Billing Selection
The open-source software is free, with cost sitting in servers, object storage and operations; ClickHouse Cloud meters compute and storage separately and scales compute to zero when idle.
| Billing mode / plan | Reference rate level | Configuration and metering rules | Workload fit |
|---|---|---|---|
| Open source, self-hosted | Software free (Apache-2.0) | No license fee; cost is servers, object storage and operations staff | Data residency, full cluster control |
| Cloud Basic | Compute about $0.2181 / compute-unit hour; storage about $25.30 / TB-month | Single replica, 8-12 GiB total memory, 1 TB storage cap | Development, testing, small departmental apps |
| Cloud Scale | Compute about $0.2985 / compute-unit hour; storage about $25.30 / TB-month | Multi-AZ replicas, unlimited storage, private networking, compute-compute separation | Production and large data volumes |
| Cloud Enterprise | Compute about $0.3903 / compute-unit hour; storage about $25.30 / TB-month | Adds SAML SSO, customer-managed keys, private regions, HIPAA and PCI | Regulated industries, enterprise governance |
| Egress | Public egress from about $0.1152 / GB; cross-region from about $0.0312 / GB | Ingress free, billed on actual transfer volume | Result delivery, cross-region sync |
| Free trial | $300 in credits over 30 days | One-time per new organization; pay-as-you-go after credits expire | Proof of concept and load testing |
Pricing note: these are 2026-11 list price levels in USD on pay-as-you-go terms, and unit rates move with cloud provider and region. Compute units are metered by the minute, storage is metered on compressed size plus backups, and analytical data commonly compresses around 10x. Subscribing through the AWS, GCP or Azure marketplace costs the same as buying direct, with invoicing handled by the marketplace or by ClickHouse respectively.
FAQ
- Can ClickHouse replace MySQL as a transactional primary database? No. It targets analytical queries and does not support multi-statement transactions or high-frequency single-row updates; order and account workloads still need an OLTP database, so the usual pattern keeps current state in that database and replicates detail rows into ClickHouse for aggregation.
- Does ClickHouse Cloud require an ICP filing? No. Public regions run on AWS, GCP and Azure nodes outside mainland China, signup needs only an email and a payment method, and invoices are issued in USD; teams serving mainland users still need to assess cross-border latency and data-export rules themselves.
- What does the free trial include and how is usage billed? Every new organization gets $300 in credits valid for 30 days, then moves to pay-as-you-go. Compute is billed per compute-unit hour with minute-level metering and scales to zero when idle; storage is billed continuously on compressed data plus backups, and ingress traffic is not charged.
- How do Cloud and self-hosted open source differ in scope? The split is who operates the system. The open-source build is free and can run entirely inside a private network, but replicas, Keeper, backups and upgrades are yours to maintain; Cloud hands those tasks to the platform and bills compute plus storage, which suits teams without dedicated cluster operators.
- How much work is migrating from PostgreSQL or MySQL? It works but requires schema changes. ClickPipes syncs incremental data continuously from PostgreSQL, MySQL and MongoDB while history loads in bulk; tables must be redesigned around sort keys and partitions, transactional and high-frequency update logic becomes batched appends, and SQL dialect differences are fixed one query at a time.
Integration & Code Examples
Example 1: Check Cloud connectivity through the HTTPS interface
# Host, port and user come from the Cloud console connection panel; replace the password with your service password
curl "https://your-service.clickhouse.cloud:8443/?query=SELECT%20version()" \
--user "default:your-password"
The HTTP interface uses port 8443 with TLS and 8123 without it; a returned version string means both the network path and the credentials work.
Example 2: Create a MergeTree table with TTL for log data
CREATE TABLE events
(
event_date Date,
event_type LowCardinality(String),
user_id UInt64,
payload String
)
ENGINE = MergeTree
PARTITION BY toYYYYMM(event_date)
ORDER BY (event_type, event_date, user_id)
TTL event_date + INTERVAL 90 DAY;
The sort key sets index granularity and data pruning, partitions split by month, and background merges drop expired partitions once the TTL passes, so no manual delete script is needed.
Example 3: Query from the official Python client
# pip install clickhouse-connect
import clickhouse_connect
client = clickhouse_connect.get_client(
host="your-service.clickhouse.cloud",
port=8443,
username="default",
password="your-password",
secure=True,
)
rows = client.query("SELECT event_type, count() FROM events GROUP BY event_type").result_rows
for event_type, total in rows:
print(event_type, total)
One client instance can be reused across queries; for bulk loads use client.insert with enough rows per batch so per-row inserts do not multiply background merge work.
Community & Resources
Official channels
- ClickHouse documentation — reference, SQL syntax and operational guides
- GitHub: ClickHouse/ClickHouse — source code, issues and release notes
- ClickHouse blog — release notes, benchmarks and engineering write-ups
- Installation guide — packages and container images per platform
- Official X account — releases and event announcements
Further reading
- Why ClickHouse is fast — columnar storage, vectorized execution and merge-tree trade-offs
- Log search alternative: log aggregation with Loki, suited to smaller log volumes with keyword search only
Articles
- 01 GitLab CI/CD Pipeline Practices 07-18
- 02 Prometheus Monitoring and Alert Setup 07-18
- 03 Choosing Free Fonts for Commercial Use 11-25
- 04 BaaS Platform Selection and Migration Scope 11-29
- 05 What Ansible Automation Really Costs 07-18
- 06 Migrating Spring Boot 4 to Native Image 11-29
- 07 Backend Language Selection and Runtime Boundaries 11-29
- 08 Docker Single-Host Deploy: Build to TLS 07-18
- 09 Django, FastAPI, or Flask for a Python Web Project 11-29
- 10 Choosing a Node.js Backend Framework 11-29