🚀 Try Zilliz Cloud, the fully managed Milvus, for free—experience 10x faster performance! Try Now>>

Milvus
Zilliz

What is the difference between TPC-C and TPC-H?

TPC-C and TPC-H are industry-standard benchmarks designed to measure different types of database performance. TPC-C focuses on online transaction processing (OLTP) workloads, simulating real-time transactional systems like order entry or inventory management. In contrast, TPC-H targets analytical processing (OLAP), modeling complex business decision-support queries over large datasets. The key difference lies in their use cases: TPC-C stresses transactional throughput and concurrency, while TPC-H evaluates query optimization and scalability for data analysis.

TPC-C emulates a wholesale supplier managing orders across multiple warehouses. It defines a mix of read-heavy and write-heavy transactions (e.g., creating orders, updating stock levels) to mimic high-concurrency scenarios. For example, the benchmark requires at least 45% of transactions to involve writes, ensuring realistic lock contention and disk I/O patterns. The metric for TPC-C is transactions per minute (tpmC), which measures how many orders a system can process under strict response-time constraints. This makes it ideal for testing systems handling real-time operations, like e-commerce platforms or banking systems, where low latency and data integrity are critical.

TPC-H, on the other hand, uses a schema with tables like Customer, Orders, and LineItem, and defines 22 complex SQL queries to simulate ad-hoc business analysis. These queries often involve large joins, aggregations, and subqueries—for example, calculating revenue trends or identifying underperforming regions. The benchmark emphasizes query throughput (QphH), which measures how many queries a system can complete per hour while adhering to scalability rules (e.g., data size grows with the number of queries). TPC-H is tailored for data warehousing or business intelligence tools, where optimizing for long-running analytical queries matters more than transaction speed. Unlike TPC-C, TPC-H prohibits indexing optimizations specific to the benchmark queries, ensuring real-world applicability.

In practice, TPC-C and TPC-H require different optimizations. A system tuned for TPC-C might prioritize fast row-level locking, efficient transaction logging, and high-speed storage to handle concurrent updates. Meanwhile, a TPC-H-optimized system would focus on columnar storage, parallel query execution, and advanced indexing for large scans. Developers use these benchmarks to validate system designs: for instance, a retail company might use TPC-C to test its order-processing backend, while a financial analyst team might rely on TPC-H to evaluate a new data lake’s analytical capabilities.

Like the article? Spread the word