Skip to main content
TPC-H is a decision support benchmark developed by the Transaction Processing Performance Council (TPC). It consists of a suite of business oriented ad-hoc queries and concurrent data modifications. TPC-H can be used to build models based on real production environments to simulate the data warehouse of a sales system. This test uses eight tables with a data size ranging from 1 GB to 3 TB. A total of 22 queries are tested and the main performance metrics are the response time of each query, which is the duration between the time a query is submitted to the time the result is returned.

1. Test conclusion

A comparative test was conducted on the TPC-H 100G scale dataset, with a total of 22 queries. The results are as follows: TPCH 100G results The database tested two methods using local storage and Hive table queries. The database Hive table and Trino query the same data. The data is stored in ORC format and compressed in zlib format. The latency for the database to query data from its native storage is 21s, that for the database to query Hive external tables is 92s, and that for Trino to query Hive external tables was 187s.

2. Test Preparation

2.1 Hardware environment

2.2 Software environment

The database and Trino are deployed on machines with the same configuration. The database has 1 FE and 3 BEs deployed. Trino has 1 Coordinator and 3 Workers deployed.
  • Kernel version: Linux 3.10.0-1127.13.1.el7.x86_64
  • Operating system version: CentOS Linux release 7.8.2003
  • Software version: StarRocks Community Edition 3.0, Trino-419, Hive-2.3.9

3 Test data and results

3.1 Test data

3.2 Test results

Note The unit of query results is ms. Lower is better. All queries are warmed up 1 time and then executed 3 times to take the average value as the result.

4. Test process

4.1 Query Native Table

4.1.1 Generate data

Download the tpch-poc tool package to generate data for the TPC-H standard test set scale factor=100.

4.1.2 Create table structure

Modify the configuration file conf/starrocks.conf, specify the cluster address (host and port), and then perform the table creation operation.

4.1.3 Import data

4.1.4 Query data

4.2 Query Hive external tables with the database

4.2.1 Create table structure

Create an external table in Hive. The external table storage format is ORC and the compression format is zlib. For detailed table creation statements, see 5.3. This Hive external table is used for both the database and Trino queries. http://localhost:3000/docs/benchmarking/TPC-H_Benchmarking/

4.2.2 Import data

Upload the TPC-H CSV original data generated in step 4.1.1 to the HDFS specified path (this article uses the path /user/tmp/csv/), and then create an external table in Hive. For detailed table creation statements, see 5.4. The storage format of this Hive external table is CSV, and the storage path is /user/tmp/csv/, the path where the CSV original data is uploaded. Import the data of the external table in CSV format into the external table in ORC format using INSERT INTO, so that the data is obtained in the storage format of ORC and the compression format of zlib. The import command is as follows:

4.2.3 Query data

The database uses the Catalog function to query Hive table data. For detailed operations, see Hive catalog.

5. Query SQL and create table statements

5.1 TPC-H query SQL

5.2 Native table creation

5.3 Hive external table creation (ORC storage format)

5.4 Hive external table creation (CSV storage format)