Need advice about which tool to choose?Ask the StackShare community!

Clickhouse

439
543
+ 1
85
TiDB

77
177
+ 1
28
Add tool

Clickhouse vs TiDB: What are the differences?

Introduction

Here we will discuss the key differences between ClickHouse and TiDB.

  1. Data Model: ClickHouse uses a columnar data model, which means that data is stored and processed column by column. On the other hand, TiDB uses a row-based data model, where data is stored and processed row by row. This difference in data model can impact the performance and efficiency of query processing.

  2. Distributed Architecture: ClickHouse is designed to be a distributed system by default, allowing for horizontal scaling and high availability. In contrast, TiDB is a distributed NewSQL database that combines the scalability of NoSQL with the ACID guarantees of SQL databases. Its distributed architecture enables automatic data sharding and efficient load balancing.

  3. Consistency Model: ClickHouse provides eventual consistency, which means that updates to the data might not be immediately visible to all the nodes in the cluster. TiDB, on the other hand, provides strong consistency, ensuring that updates are immediately visible and that concurrent transactions do not result in conflicts.

  4. SQL Compatibility: Although both ClickHouse and TiDB support SQL, they have differences in SQL compatibility. ClickHouse supports a subset of SQL, focusing on analytical workloads. TiDB, being a NewSQL database, aims to provide full SQL compatibility with features such as joins, indexes, and transactions.

  5. Replication Mechanism: ClickHouse uses a log-based replication mechanism, where log files are replicated between nodes. This approach allows for efficient replication and can handle high write throughput. TiDB, on the other hand, uses a Raft-based consensus protocol for replication, ensuring data consistency across nodes in the cluster.

  6. Storage Engine: ClickHouse uses its own storage engine optimized for columnar data processing, which provides high compression and fast query execution for analytical workloads. TiDB, on the other hand, uses a pluggable storage engine architecture and supports multiple engines like TiKV and TiFlash, providing flexibility for different use cases.

In summary, ClickHouse and TiDB differ in their data model, distributed architecture, consistency model, SQL compatibility, replication mechanism, and storage engine, making them suitable for different use cases and performance requirements.

Manage your open source components, licenses, and vulnerabilities
Learn More
Pros of Clickhouse
Pros of TiDB
  • 21
    Fast, very very fast
  • 11
    Good compression ratio
  • 7
    Horizontally scalable
  • 6
    Utilizes all CPU resources
  • 5
    RESTful
  • 5
    Open-source
  • 5
    Great CLI
  • 4
    Great number of SQL functions
  • 4
    Buggy
  • 3
    Server crashes its normal :(
  • 3
    Highly available
  • 3
    Flexible connection options
  • 3
    Has no transactions
  • 2
    ODBC
  • 2
    Flexible compression options
  • 1
    In IDEA data import via HTTP interface not working
  • 9
    Open source
  • 7
    Horizontal scalability
  • 5
    Strong ACID
  • 3
    HTAP
  • 2
    Mysql Compatibility
  • 2
    Enterprise Support

Sign up to add or upvote prosMake informed product decisions

Cons of Clickhouse
Cons of TiDB
  • 5
    Slow insert operations
    Be the first to leave a con

    Sign up to add or upvote consMake informed product decisions

    - No public GitHub repository available -

    What is Clickhouse?

    It allows analysis of data that is updated in real time. It offers instant results in most cases: the data is processed faster than it takes to create a query.

    What is TiDB?

    Inspired by the design of Google F1, TiDB supports the best features of both traditional RDBMS and NoSQL.

    Need advice about which tool to choose?Ask the StackShare community!

    What companies use Clickhouse?
    What companies use TiDB?
    Manage your open source components, licenses, and vulnerabilities
    Learn More

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with Clickhouse?
    What tools integrate with TiDB?

    Sign up to get full access to all the tool integrationsMake informed product decisions

    What are some alternatives to Clickhouse and TiDB?
    Cassandra
    Partitioning means that Cassandra can distribute your data across multiple machines in an application-transparent matter. Cassandra will automatically repartition as machines are added and removed from the cluster. Row store means that like relational databases, Cassandra organizes data by rows and columns. The Cassandra Query Language (CQL) is a close relative of SQL.
    Elasticsearch
    Elasticsearch is a distributed, RESTful search and analytics engine capable of storing data and searching it in near real time. Elasticsearch, Kibana, Beats and Logstash are the Elastic Stack (sometimes called the ELK Stack).
    MySQL
    The MySQL software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software.
    InfluxDB
    InfluxDB is a scalable datastore for metrics, events, and real-time analytics. It has a built-in HTTP API so you don't have to write any server side code to get up and running. InfluxDB is designed to be scalable, simple to install and manage, and fast to get data in and out.
    Druid
    Druid is a distributed, column-oriented, real-time analytics data store that is commonly used to power exploratory dashboards in multi-tenant environments. Druid excels as a data warehousing solution for fast aggregate queries on petabyte sized data sets. Druid supports a variety of flexible filters, exact calculations, approximate algorithms, and other useful calculations.
    See all alternatives