Choosing the right database is a critical choice when building any software application. All databases have different strengths and weaknesses when it comes to performance, so deciding which database has the most benefits and the most minor downsides for your specific use case and data model is an important decision. Below you will find an overview of the key concepts, architecture, features, use cases, and pricing models of ClickHouse and Mimir so you can quickly see how they compare against each other.

The primary purpose of this article is to compare how ClickHouse and Mimir perform for workloads involving time series data, not for all possible use cases. Time series data typically presents a unique challenge in terms of database performance. This is due to the high volume of data being written and the query patterns to access that data. This article doesn’t intend to make the case for which database is better; it simply provides an overview of each database so you can make an informed decision.

ClickHouse vs Mimir Breakdown


 
Database Model

Columnar database

Time series database

Architecture

ClickHouse can be deployed on-premises, in the cloud, or as a managed service.

Grafana Mimir is a time series database designed for high-performance, real-time monitoring, and analytics. It features a distributed architecture, allowing for horizontal scaling across multiple nodes to handle large volumes of data and queries. It can be deployed on-prem due to being open source or as a managed solution hosted by Grafana

License

Apache 2.0

APGL 3.0

Use Cases

Real-time analytics, big data processing, event logging, monitoring, IoT, data warehousing

Monitoring, observability, IoT

Scalability

Horizontally scalable, supports distributed query processing and parallel execution

Horizontally scalable

ClickHouse Overview

ClickHouse is an open source columnar database management system designed for high-performance online analytical processing (OLAP) tasks. It was developed by Yandex, a leading Russian technology company. ClickHouse is known for its ability to process large volumes of data in real-time, providing fast query performance and real-time analytics. Its columnar storage architecture enables efficient data compression and faster query execution, making it suitable for large-scale data analytics and business intelligence applications.

Mimir Overview

Grafana Mimir is an open-source software project that provides a scalable long-term storage solution for Prometheus. Started at Grafana Labs and announced in 2022, Grafana Mimir aims to become the most scalable and performant open-source time series database for metrics. The project incorporates the knowledge and experience gained by Grafana Labs engineers from running Grafana Enterprise Metrics and Grafana Cloud Metrics at massive scale.


ClickHouse for Time Series Data

ClickHouse can be used for storing and analyzing time series data effectively, although it is not explicitly optimized for working with time series data. While ClickHouse can query time series data very quickly once ingested, it tends to struggle with very high write scenarios where data needs to be ingested in smaller batches so it can be analyzed in real time.

Mimir for Time Series Data

Grafana Mimir is well-suited for handling time series data, making it a suitable choice for scenarios involving metric storage and analysis. It provides long-term storage capabilities for Prometheus, a popular open-source monitoring and alerting system. With Grafana Mimir, users can store and query time series metrics over extended periods, allowing for historical analysis and trend detection. It is especially useful for applications that require scalable and performant storage of time series data for metrics monitoring and observability purposes.


ClickHouse Key Concepts

  • Columnar storage: ClickHouse stores data in a columnar format, which means that data for each column is stored separately. This enables efficient compression and faster query execution, as only the required columns are read during query execution.
  • Distributed processing: ClickHouse supports distributed processing, allowing queries to be executed across multiple nodes in a cluster, improving query performance and scalability.
  • Data replication: ClickHouse provides data replication, ensuring data availability and fault tolerance in case of hardware failures or node outages.
  • Materialized Views: ClickHouse supports materialized views, which are precomputed query results stored as tables. Materialized views can significantly improve query performance, as they allow for faster data retrieval by avoiding the need to recompute the results for each query.

Mimir Key Concepts

  • Metrics: In Grafana Mimir, metrics represent the measurements or observations tracked over time. They can include various types of data, such as system metrics, application performance metrics, or sensor data.
  • Long-term Storage: Grafana Mimir provides a storage solution specifically tailored for long-term retention of time series data, allowing users to store and query historical metrics over extended periods.
  • Microservices: Grafana Mimir adopts a microservices-based architecture, where the system consists of multiple horizontally scalable microservices that can operate independently and in parallel.


ClickHouse Architecture

ClickHouse’s architecture is designed to support high-performance analytics on large datasets. ClickHouse stores data in a columnar format. This enables efficient data compression and faster query execution, as only the required columns are read during query execution. ClickHouse also supports distributed processing, which allows for queries to be executed across multiple nodes in a cluster. ClickHouse uses the MergeTree storage engine as its primary table engine. MergeTree is designed for high-performance OLAP tasks and supports data replication, data partitioning, and indexing.

Mimir Architecture

Grafana Mimir adopts a microservices-based architecture, where the system comprises multiple horizontally scalable microservices. These microservices can operate independently and in parallel, allowing for efficient distribution of workload and scalability. Grafana Mimir’s components are compiled into a single binary, providing a unified and cohesive system. The architecture is designed to be highly available and multi-tenant, enabling multiple users and applications to utilize the database concurrently. This distributed architecture ensures scalability and resilience in handling large-scale metric storage and retrieval scenarios.

Free Time-Series Database Guide

Get a comprehensive review of alternatives and critical requirements for selecting yours.

ClickHouse Features

Real-time analytics

ClickHouse is designed for real-time analytics and can process large volumes of data with low latency, providing fast query performance and real-time insights.

Data compression

ClickHouse’s columnar storage format enables efficient data compression, reducing storage requirements and improving query performance.

Materialized views

ClickHouse supports materialized views, which can significantly improve query performance by precomputing and storing query results as tables.

Mimir Features

Scalability

Grafana Mimir is designed to scale horizontally, enabling the system to handle growing data volumes and increasing workloads. Its horizontally scalable microservices architecture allows for seamless expansion and improved performance.

High Availability

Grafana Mimir provides high availability by ensuring redundancy and fault tolerance. It allows for replication and distribution of data across multiple nodes, ensuring data durability and continuous availability of stored metrics.

Long-term Storage

Grafana Mimir offers a dedicated solution for long-term storage of time series metrics. It provides efficient storage and retrieval mechanisms, allowing users to retain and analyze historical metric data over extended periods.


ClickHouse Use Cases

Large-scale data analytics

ClickHouse’s high-performance query engine and columnar storage format make it suitable for large-scale data analytics and business intelligence applications.

Real-time reporting

ClickHouse’s real-time analytics capabilities enable organizations to generate real-time reports and dashboards, providing up-to-date insights for decision-making.

Log and event data analysis

ClickHouse’s ability to process large volumes of data in real-time makes it a suitable choice for log and event data analysis, such as analyzing web server logs or application events.

Mimir Use Cases

Metrics Monitoring and Observability

Grafana Mimir is well-suited for monitoring and observability use cases. It enables the storage and analysis of time series metrics, allowing users to monitor the performance, health, and behavior of their systems and applications in real-time.

Long Term Metric Storage

With its focus on providing scalable long-term storage, Grafana Mimir is ideal for applications that require retaining and analyzing historical metric data over extended periods. It allows users to store and query large volumes of time series data generated by Prometheus.

Trend and anomaly detection

By using Mimir for storing long term historical data it can be useful for detecting trends in your metrics and also for comparing current metrics to historical data to detect outliers and anomalies


ClickHouse Pricing Model

ClickHouse is an open source database and can be deployed on your own hardware. The developers of ClickHouse have also recently created ClickHouse Cloud which is a managed service for deploying ClickHouse.

Mimir Pricing Model

Grafana Mimir is an open-source project, which means it is freely available for usage and does not require any licensing fees. Users can download the source code and deploy Grafana Mimir on their own infrastructure without incurring direct costs. However, it’s important to consider the operational costs associated with hosting and maintaining the database infrastructure.

Get started with InfluxDB for free

InfluxDB Cloud is the fastest way to start storing and analyzing your time series data.