TPC-DS benchmark

Updated at: 2025-02-28 02:40

ApsaraDB for SelectDB is designed to provide high-performance and easy-to-use data analysis services. ApsaraDB for SelectDB provides high performance in scenarios such as wide table aggregation, multi-table join queries, and high-concurrency point queries. This topic describes how to use TPC Benchmark DS (TPC-DS) to test the performance of SelectDB by running complex queries in a Linux environment. This topic also describes the test results.

Overview

TPC-DS is a decision support benchmark formulated by the Transaction Processing Performance Council (TPC) to evaluate the performance of different systems in processing complex queries and analyzing large amounts of data.

TPC-DS is designed to simulate complex decisions in actual business. TPC-DS tests the performance of systems by running a series of complex queries and performing data operations. The queries include join queries, aggregate queries, sort queries, filter queries, and subqueries. These queries are run in various scenarios of different complexity, such as report generation, data mining, and online analytical processing (OLAP).

Prerequisites

The SelectDB instance is of V4.0 or later.

Preparations

  • Perform the following steps to connect the server on which you want to install the TPC-DS test tool to the SelectDB instance:

    1. Apply for a public endpoint for the SelectDB instance. For more information, see Apply for or release a public endpoint.

      Skip this step if you want to install the TPC-DS test tool on an Elastic Compute Service (ECS) instance that resides in the same virtual private cloud (VPC) as the ApsaraDB for SelectDB instance.

    2. Add the IP address of the server on which you want to install the TPC-DS test tool to the whitelist of the ApsaraDB for SelectDB instance. For more information, see Configure an IP address whitelist.

  • Make sure that MySQL is installed on the server on which you want to install the TPC-DS test tool.

    If you have not installed MySQL, run the following command to install MySQL:

    yum install mysql
  • Prepare a destination database.

    Skip this step if a destination database is available.

    1. Connect to the ApsaraDB for SelectDB instance. For more information, see Connect to an ApsaraDB for SelectDB instance by using DMS.

    2. Execute the following statement to create a database:

      CREATE DATABASE <db_name>;

Test environment

  • SelectDB database environment

    Item

    Description

    Item

    Description

    Region and zone

    Zone K in the China (Hangzhou) region

    Specifications

    64 CPU cores and 512 GB of memory

    Disk

    800 GB high-performance Enterprise SSD (ESSD)

    ApsaraDB for SelectDB kernel version

    4.0.3

  • Client environment

    Item

    Description

    Item

    Description

    Device for downloading the test tool

    An ECS instance. For more information about how to create an ECS instance, see Create an instance.

    Region and zone

    China (Hangzhou)

    Instance type

    ecs.g7.2xlarge

    Operating system

    Ubuntu 22.04.1 LTS

    Network

    The ECS instance resides in the same VPC as the ApsaraDB for SelectDB instance.

Test datasets

Note

Standard TPC-DS test datasets are usually far from the actual business scenario, and some tests perform parameter tuning for the test datasets. Therefore, the test results that are generated by using the standard test datasets can only reflect the performance of databases in specific scenarios. We recommend that you use actual business data for further testing.

In this test, TPC-DS test datasets of 100 GB and 1,000 GB are generated and imported into the SelectDB instance to test the performance of SelectDB. The following table describes the tables in the TPC-DS test dataset of 1,000 GB.

Table

Number of rows

Table

Number of rows

customer_demographics

1,920,800

reason

65

warehouse

20

date_dim

73,049

catalog_sales

1,439,980,416

call_center

42

inventory

783,000,000

catalog_returns

143,996,756

household_demographics

7,200

customer_address

6,000,000

income_band

20

catalog_page

30,000

item

300,000

web_returns

71,997,522

web_site

54

promotion

1,500

web_sales

720,000,376

store

1,002

web_page

3,000

time_dim

86,400

store_returns

287,999,764

store_sales

2,879,987,999

ship_mode

20

customer

12,000,000

Procedure

Step 1: Install the TPC-DS test tool

  1. Download the Business Foundation System test tool.

    wegt https://selectdb-customers-tools-bj.oss-cn-beijing.aliyuncs.com/yaochi_performance_tool.tar.gz
  2. Decompress the tool file.

    tar -zxvf yaochi_performance_tool.tar.gz
  3. In the test tool installation directory yaochi_performance_tool/tpcds-tools/bin/, run the following command to download and compile the tpcds-tools tool:

    bash build-tpcds-tools.sh

Step 2: Generate a TPC-DS test dataset

In the test tool installation directory yaochi_performance_tool/tpcds-tools/bin/, run the following command to generate a TPC-DS test dataset:

bash gen-tpcds-data.sh -s 1000

The generated TPC-DS test dataset is saved in a file suffixed by .dat in the tpcds-data directory.

Step 3: Create TPC-DS test tables

  1. Configure the SelectDB instance.

    Before you create tables, you must configure the SelectDB instance in the doris-cluster.conf file. The file is stored in the test tool installation directory yaochi_performance_tool/tpcds-tools/conf/. The following table describes the parameters.

    Parameter

    Description

    Parameter

    Description

    FE_HOST

    The endpoint that is used to access the SelectDB instance.

    You can view the VPC endpoint or public endpoint of the ApsaraDB for SelectDB instance in the Network Information section of the Instance Details page of the SelectDB instance.

    FE_HTTP_PORT

    The HTTP port that is used to access the SelectDB instance.

    You can view the HTTP port of the ApsaraDB for SelectDB instance in the Network Information section of the Instance Details page of the SelectDB instance.

    FE_QUERY_PORT

    The MySQL port that is used to access the ApsaraDB for SelectDB instance. You can view the MySQL port of the ApsaraDB for SelectDB instance in the Network Information section of the Instance Details page of the SelectDB instance.

    USER

    The username that is used to log on to the SelectDB instance.

    By default, an admin account is created to log on to an SelectDB instance after it is created.

    PASSWORD

    The password that is used to log on to the SelectDB instance.

    If you use the admin account to log on to your ApsaraDB for SelectDB instance but you forget the corresponding password, you can reset the password in the console.

    DB

    The name of the database to which you want to import data in the ApsaraDB for SelectDB instance.

  2. Create tables.

    In the test tool installation directory yaochi_performance_tool/tpcds-tools/bin/, run the following command to create tables for testing. After the command is run, the preceding tables in the test dataset are generated in the destination database in the SelectDB instance.

    bash create-tpcds-tables.sh -s 1000

Step 4: Import data to ApsaraDB for SelectDB

In the test tool installation directory yaochi_performance_tool/tpcds-tools/bin/, run the following command to import all data of the TPC-DS test dataset to SelectDB:

bash load-tpcds-data.sh

Step 5: Perform test queries

You can run multiple SQL queries at a time on the test dataset.

In the test tool installation directory yaochi_performance_tool/tpcds-tools/bin/, run the following command:

bash run-tpcds-queries.sh -s 1000

After the command is run, the performance metrics of each SQL query run on the SelectDB instance are displayed in the console. For more information about the test results, see the Test results section of this topic.

You can also run a specific SQL query to test the performance of SelectDB.

Note

The SQL queries displayed on GitHub are consistent with those performed by running the query command.

Test results

The following table describes the test results based on the TPC-DS 100 GB dataset and TPC-DS 1,000 GB dataset.

Query

TPC-DS 100 GB dataset (seconds)

TPC-DS 1,000 GB dataset (seconds)

Query

TPC-DS 100 GB dataset (seconds)

TPC-DS 1,000 GB dataset (seconds)

Q1

0.19

1.01

Q2

1.12

8.54

Q3

0.12

0.65

Q4

2.15

21.06

Q5

0.29

1.17

Q6

0.13

0.33

Q7

0.21

1.11

Q8

0.14

0.55

Q9

1.56

13.48

Q10

0.2

0.71

Q11

1.26

12.44

Q12

0.08

0.19

Q13

0.25

1.27

Q14

1.64

12.85

Q15

0.11

0.73

Q16

0.76

0.68

Q17

0.37

1.69

Q18

0.22

1.17

Q19

0.11

0.41

Q20

0.09

0.23

Q21

0.07

0.12

Q22

2.25

4.18

Q23

3.33

39.14

Q24

0.71

9.71

Q25

0.32

1.05

Q26

0.13

0.41

Q27

0.2

1.03

Q28

1.32

12.02

Q29

0.31

1.35

Q30

0.12

0.48

Q31

0.47

4.91

Q32

0.05

0.1

Q33

0.27

0.75

Q34

0.34

1.44

Q35

0.42

2.36

Q36

0.61

0.91

Q37

0.06

0.13

Q38

1.43

11.23

Q39

0.34

0.6

Q40

0.08

0.19

Q41

0.04

0.04

Q42

0.08

0.19

Q43

0.32

2.14

Q44

0.54

3.99

Q45

0.1

0.55

Q46

0.41

4.62

Q47

0.82

6.13

Q48

0.24

1.03

Q49

0.3

1.23

Q50

0.26

1.93

Q51

4.01

11.87

Q52

0.07

0.22

Q53

0.12

0.59

Q54

0.34

2.6

Q55

0.07

0.22

Q56

0.23

0.61

Q57

0.59

3.38

Q58

0.21

0.48

Q59

1.69

15.65

Q60

0.24

0.74

Q61

0.12

1

Q62

0.26

1.98

Q63

0.12

0.46

Q64

0.55

4.91

Q65

1.33

10.39

Q66

0.21

0.86

Q67

6.87

59.04

Q68

0.37

4.44

Q69

0.23

0.68

Q70

0.78

5.54

Q71

0.22

0.74

Q72

2.66

8.81

Q73

0.24

1.27

Q74

1.57

10.5

Q75

1.13

8.73

Q76

0.35

4.86

Q77

0.25

0.74

Q78

2.89

31.02

Q79

0.39

8.42

Q80

0.34

1.07

Q81

0.15

0.84

Q82

0.09

0.72

Q83

0.14

0.3

Q84

0.07

0.22

Q85

0.25

0.45

Q86

0.2

1.36

Q87

1.55

13.14

Q88

1.5

12.36

Q89

0.17

0.88

Q90

0.11

0.41

Q91

0.1

0.16

Q92

0.04

0.07

Q93

0.31

5.4

Q94

0.34

0.57

Q95

0.21

0.8

Q96

0.2

1.41

Q97

1.26

13.26

Q98

0.16

0.43

Q99

0.48

4.13

  • On this page (1)
  • Overview
  • Prerequisites
  • Preparations
  • Test environment
  • Test datasets
  • Procedure
  • Step 1: Install the TPC-DS test tool
  • Step 2: Generate a TPC-DS test dataset
  • Step 3: Create TPC-DS test tables
  • Step 4: Import data to ApsaraDB for SelectDB
  • Step 5: Perform test queries
  • Test results
Feedback