📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

TPC-H Benchmark: TiDB Cloud Lake vs. Snowflake



Quick Overview

TPC-H

The TPC-H benchmark is a standard for evaluating decision support systems, focusing on complex queries and data maintenance. This analysis compares TiDB Cloud Lake with Snowflake using the TPC-H SF100 (SF1 = 6 million rows) dataset, encompassing 100GB of data and approximately 600 million rows across 22 queries.

Snowflake and TiDB Cloud Lake

  • Snowflake: Snowflake is renowned for its advanced features such as separating storage and compute, scalable computing on demand, data sharing, and cloning capabilities.

  • TiDB Cloud Lake: TiDB Cloud Lake offers similar functionalities to Snowflake, being a cloud-native data warehouse that also separates storage from computing and provides scalable computing as needed.

    It positions itself as a modern, cost-effective alternative to Snowflake, especially for large-scale analytics.

Performance and Cost Comparison

  • Data Loading Costs: TiDB Cloud Lake achieves a 48% cost reduction in data loading compared to Snowflake.
  • Query Execution Costs: TiDB Cloud Lake is approximately 35% less expensive for query execution than Snowflake (cold run; ~27% on hot run).

Data Loading Benchmark

TPC-H SF100 data loading benchmark

TableSnowflake (695s, Cost $0.77)TiDB Cloud Lake (446s, Cost $0.40)Rows
customer18.13713.43615,000,000
lineitem477.740305.812600,037,902
nation1.3470.70825
orders103.08864.323150,000,000
part19.90812.19220,000,000
partsupp67.41045.34680,000,000
region0.7430.7255
supplier3.0003.68710,000,000
Total Time695s446s
Total Cost$0.77$0.40
Storage Size20.8GB24.5GB

Query Benchmark: Cold Run

TPC-H SF100 Cold Run Benchmark

QuerySnowflake (Total 207s, Cost $0.23)TiDB Cloud Lake (Total 166s, Cost $0.15)
TPC-H 111.7038.036
TPC-H 24.5243.786
TPC-H 38.9086.040
TPC-H 48.1084.462
TPC-H 59.2027.014
TPC-H 61.2373.234
TPC-H 79.0827.345
TPC-H 810.8868.976
TPC-H 918.15213.340
TPC-H 1013.52512.891
TPC-H 112.5822.183
TPC-H 1210.0998.839
TPC-H 1313.4587.206
TPC-H 148.0014.612
TPC-H 158.7374.621
TPC-H 164.8641.645
TPC-H 175.36314.315
TPC-H 1819.97112.058
TPC-H 199.89312.579
TPC-H 208.5388.836
TPC-H 2116.43912.270
TPC-H 223.7441.926
Total Time207s166s
Total Cost$0.23$0.15

Query Benchmark: Hot Run

TPC-H SF100 Hot Run Benchmark

QuerySnowflake (Total 138s, Cost $0.15)TiDB Cloud Lake (Total 124s, Cost $0.11)
TPC-H 18.9347.568
TPC-H 23.0183.125
TPC-H 36.0895.234
TPC-H 44.9143.392
TPC-H 55.8004.857
TPC-H 60.8912.142
TPC-H 75.3814.389
TPC-H 85.7245.887
TPC-H 910.2839.621
TPC-H 1010.3688.524
TPC-H 111.1651.364
TPC-H 127.0525.352
TPC-H 1312.8296.180
TPC-H 143.2882.725
TPC-H 153.4752.748
TPC-H 164.0941.124
TPC-H 174.20313.757
TPC-H 1818.58311.630
TPC-H 193.8887.881
TPC-H 206.3795.797
TPC-H 2110.2879.806
TPC-H 221.5731.122
Total Time138s124s
Total Cost$0.15$0.11

Reproduce the Benchmark

You can reproduce the benchmark by following the steps below.

Benchmark Environment

The benchmark tests both Snowflake and TiDB Cloud Lake under similar conditions:

ParameterSnowflakeTiDB Cloud Lake
Warehouse SizeSmallSmall
Price$4/hour$3.2/hour
AWS Regionus-east-2us-east-2
StorageAWS S3AWS S3
  • The TPC-H SF100 dataset, sourced from Amazon Redshift, was loaded into both TiDB Cloud Lake and Snowflake without any specific tuning.

Benchmark Methodology

The benchmark includes both Cold and Hot runs for query execution:

  1. Cold Run: The data warehouse was suspended and resumed before executing the queries.
  2. Hot Run: The data warehouse is not suspended, local disk cache is used.

Prerequisites

Data Loading

  1. Snowflake Data Load:

  2. TiDB Cloud Lake Data Load:

TPC-H Queries

  1. Snowflake Queries:

  2. TiDB Cloud Lake Queries:

Was this page helpful?