ClickHouse Documentation

website·Indexed 43 days ago

https://clickhouse.com/docs

A column-oriented SQL database management system (DBMS) for online analytical processing (OLAP). Documentation covers core architecture, including the MergeTree engine, sparse primary indexes, table partitions, and parallel query execution, as well as deployment modes for ClickHouse Server and ClickHouse Cloud. Includes migration guides from BigQuery, PostgreSQL, and Elasticsearch.

Tokens
2.8M
Snippets
12K
Records
21.9K
Agent score
75%

What's inside ClickHouse

  1. Overview of chDB Compatibility Modes

    chDB DataStore provides two compatibility modes that determine whether output is shaped for pandas compatibility or optimized for raw SQL performance:

    • Pandas Mode ("pandas"): The default mode. Ensures full pandas behavior compatibility, including row order preservation, MultiIndex support, set_index, dtype corrections, and stable sort tiebreakers.
    • Performance Mode ("performance"): A SQL-first execution mode that removes all pandas compatibility overhead for maximum throughput. Results may differ structurally from pandas.
  2. Overview of the clickhouse-c client

    The clickhouse-c library is a header-only C client for the ClickHouse native protocol. It is designed for embedding and provides low-level encoding and decoding of Native format blocks. It does not handle high-level concerns such as DNS resolution, connection pooling, retries, threading, or the HTTP protocol. Each chc_client is single-threaded.
  3. Overview of ClickHouse Cloud

    ClickHouse Cloud is a fully managed cloud service based on the open-source ClickHouse columnar OLAP database. It removes the operational overhead of infrastructure management, maintenance, scaling, and security, allowing users to focus on building analytics value. Key benefits include fast time-to-value, seamless automatic scaling for variable workloads, serverless operations, and a transparent pay-as-you-go pricing model.
  4. Overview of ClickHouse Projections

    A projection in ClickHouse is an additional sorted representation of a subset of columns stored inside the same table. It allows for fast lookups on columns not covered by the table's primary key without requiring a separate destination table.

    Key characteristics include:

    • Transparent Optimization: The query optimizer automatically selects the projection if it reduces the number of granules read; users query the base table normally.
    • Mutation Sync: Projections stay in sync with table mutations (deletes and updates).
    • Storage Trade-off: Projections increase disk usage because they store a second copy of the selected columns.
    • Comparison to Materialized Views: Projections are ideal for alternative sort orders on the same data, whereas materialized views are better for data transformation, aggregation, or routing to different schemas.
  5. Overview of ClickHouse TTL capabilities

    TTL (time-to-live) allows ClickHouse to automatically perform actions on rows or columns after a specified time interval has passed. Key use cases include:

    • Removing old data: Deleting rows or columns based on a time interval.
    • Moving data between disks: Shifting data between storage volumes to implement hot/warm/cold architectures.
    • Data rollup: Aggregating older data into summaries before deleting the detailed records.
  6. Overview of SAML SSO in ClickHouse Cloud

    ClickHouse Cloud supports service provider-initiated SSO via SAML, allowing users to authenticate through their Identity Provider (IdP). Key features include:

    • Just-in-time (JIT) provisioning: Accounts are created on first login.
    • Support for multiple organizations using separate connections.
    • Integration with SCIM provisioning for Okta and Microsoft Entra ID.
    • Ability to designate a default role for new users and adjust session timeouts.

    Note: Identity provider-initiated sign-in is not supported. Attribute mapping is not currently supported.

  7. Overview of ClickHouse Cloud and Managed Services

    ClickHouse provides several managed offerings for data analytics and observability:

    • ClickHouse Cloud: The managed cloud service for the ClickHouse data platform.
    • ClickStack: An all-in-one observability stack powered by ClickHouse for lightning-fast queries and aggregations on logs, metrics, traces, session replays, and errors.
    • ClickHouse Managed Postgres: An enterprise-grade Postgres service natively integrated with ClickHouse, allowing users to combine Postgres for transactional workloads and ClickHouse for analytics.
  8. Overview of ClickHouse Private API

    The ClickHouse Private API is an optional standalone component used to manage ClickHouse Private clusters. It provides a REST interface for performing administrative tasks such as backups, vertical scaling, password resets, and monitoring cluster status.
  9. Overview of ClickHouse Government

    ClickHouse Government is a self-deployed package that provides the proprietary version of ClickHouse used in ClickHouse Cloud, along with the ClickHouse Operator. It is specifically hardened for government agencies and public sector organizations, featuring a native separation of compute and storage.

    Key constraints and requirements:

    • Target Audience: Government agencies, public sector organizations, or cloud software companies selling to these entities.
    • Minimum Deployment Size: 2 TB.
    • Availability: Only available by contacting ClickHouse directly.
  10. Overview of ClickHouse supported data sources

    ClickHouse provides a wide variety of connectors and table engines to ingest data from external sources. Supported sources include cloud storage (AWS S3, GCS, MinIO), relational databases (PostgreSQL, MySQL, SQLite), NoSQL databases (Cassandra, Redis, MongoDB, RocksDB), messaging systems (Kafka, RabbitMQ, NATS), and big data formats (Hive, Hudi, Iceberg, Delta Lake). It also supports generic connectivity via JDBC and ODBC, as well as local file insertion.
  11. Overview of clickhouse-local

    clickhouse-local is a serverless version of ClickHouse that allows developers to perform fast data processing on local and remote files using the ClickHouse SQL dialect directly from the command line. It is ideal for development, testing, and ad-hoc file processing. It is not suitable for serving end-users or production applications; for those use cases, the full ClickHouse OLAP database is recommended.
  12. Overview of ClickHouse Native Clients and Interfaces

    ClickHouse provides several native ways to connect and interact with the database depending on the use case:

    • Command Line Tools: clickhousectl (for local and cloud management) and the ClickHouse Client (native CLI supporting config files).
    • AI & Automation: Model Context Protocol (MCP) for connecting AI assistants.
    • Developer Libraries: C++ Client Library and various other network drivers/interfaces.
    • Web Interfaces: Web Terminal (WebSocket-based clickhouse-client) and Web SQL UI (Play), accessible at the /play endpoint.
    • Data Integration: Schema Inference for automatic schema detection from input data.
    • Ecosystem: A wide range of third-party tools, libraries, and integrations.