Usage Notes

TPCDS Catalog uses the Trino Connector compatibility framework and the TPCDS Connector to quickly build TPCDS test sets.

TPCDS - 图1tip

This feature is supported starting from Doris version 3.0.0.

Compiling the TPCDS Connector

JDK 17 is required.

  1. git clone https://github.com/trinodb/trino.git
  2. git checkout 435
  3. cd trino/plugin/trino-tpcds
  4. mvn clean install -DskipTest

After compiling, you will find the trino-tpcds-435/ directory under trino/plugin/trino-tpcds/target/.

You can also directly download the precompiled trino-tpcds-435.tar.gz and extract it.

Deploying the TPCDS Connector

Place the trino-tpcds-435/ directory under the connectors/ directory in the deployment paths of all FE and BE nodes. (If it does not exist, you can create it manually).

  1. ├── bin
  2. ├── conf
  3. ├── connectors
  4. ├── trino-tpcds-435
  5. ...

After deployment, it is recommended to restart the FE and BE nodes to ensure the Connector is loaded correctly.

Creating the TPCDS Catalog

  1. CREATE CATALOG `tpcds` PROPERTIES (
  2. "type" = "trino-connector",
  3. "trino.connector.name" = "tpcds",
  4. "trino.tpcds.split-count" = "32"
  5. );

The trino.tpcds.split-count property sets the level of concurrency. It is recommended to set it to twice the number of cores per BE node to achieve optimal concurrency and improve data generation efficiency.

Using the TPCDS Catalog

The TPCDS Catalog includes pre-configured TPCDS datasets of different scale factors, which can be viewed using the SHOW DATABASES and SHOW TABLES commands.

  1. mysql> SWITCH tpcds;
  2. Query OK, 0 rows affected (0.00 sec)
  3. mysql> SHOW DATABASES;
  4. +--------------------+
  5. | Database |
  6. +--------------------+
  7. | information_schema |
  8. | mysql |
  9. | sf1 |
  10. | sf100 |
  11. | sf1000 |
  12. | sf10000 |
  13. | sf100000 |
  14. | sf300 |
  15. | sf3000 |
  16. | sf30000 |
  17. | tiny |
  18. +--------------------+
  19. 11 rows in set (0.00 sec)
  20. mysql> USE sf1;
  21. mysql> SHOW TABLES;
  22. +------------------------+
  23. | Tables_in_sf1 |
  24. +------------------------+
  25. | call_center |
  26. | catalog_page |
  27. | catalog_returns |
  28. | catalog_sales |
  29. | customer |
  30. | customer_address |
  31. | customer_demographics |
  32. | date_dim |
  33. | dbgen_version |
  34. | household_demographics |
  35. | income_band |
  36. | inventory |
  37. | item |
  38. | promotion |
  39. | reason |
  40. | ship_mode |
  41. | store |
  42. | store_returns |
  43. | store_sales |
  44. | time_dim |
  45. | warehouse |
  46. | web_page |
  47. | web_returns |
  48. | web_sales |
  49. | web_site |
  50. +------------------------+
  51. 25 rows in set (0.00 sec)

You can directly query these tables using the SELECT statement.

TPCDS - 图2tip

The data in these pre-configured datasets is not actually stored but generated in real-time during queries. Therefore, these datasets are not suitable for direct benchmarking. They are more appropriate for writing to other target tables (such as Doris internal tables, Hive, Iceberg, and other data sources supported by Doris) via INSERT INTO SELECT, after which performance tests can be conducted on the target tables.

Best Practices

Quickly Build TPCDS Test Dataset

You can quickly build a TPCDS test dataset using the CTAS (Create Table As Select) statement:

  1. CREATE TABLE hive.tpcds100.call_center PROPERTIES("file_format" = "parquet") AS SELECT * FROM tpcds.sf100.call_center ;
  2. CREATE TABLE hive.tpcds100.catalog_page PROPERTIES("file_format" = "parquet") AS SELECT * FROM tpcds.sf100.catalog_page ;
  3. CREATE TABLE hive.tpcds100.catalog_returns PROPERTIES("file_format" = "parquet") AS SELECT * FROM tpcds.sf100.catalog_returns ;
  4. CREATE TABLE hive.tpcds100.catalog_sales PROPERTIES("file_format" = "parquet") AS SELECT * FROM tpcds.sf100.catalog_sales ;
  5. CREATE TABLE hive.tpcds100.customer PROPERTIES("file_format" = "parquet") AS SELECT * FROM tpcds.sf100.customer ;
  6. CREATE TABLE hive.tpcds100.customer_address PROPERTIES("file_format" = "parquet") AS SELECT * FROM tpcds.sf100.customer_address ;
  7. CREATE TABLE hive.tpcds100.customer_demographics PROPERTIES("file_format" = "parquet") AS SELECT * FROM tpcds.sf100.customer_demographics ;
  8. CREATE TABLE hive.tpcds100.date_dim PROPERTIES("file_format" = "parquet") AS SELECT * FROM tpcds.sf100.date_dim ;
  9. CREATE TABLE hive.tpcds100.dbgen_version PROPERTIES("file_format" = "parquet") AS SELECT * FROM tpcds.sf100.dbgen_version ;
  10. CREATE TABLE hive.tpcds100.household_demographics PROPERTIES("file_format" = "parquet") AS SELECT * FROM tpcds.sf100.household_demographics;
  11. CREATE TABLE hive.tpcds100.income_band PROPERTIES("file_format" = "parquet") AS SELECT * FROM tpcds.sf100.income_band ;
  12. CREATE TABLE hive.tpcds100.inventory PROPERTIES("file_format" = "parquet") AS SELECT * FROM tpcds.sf100.inventory ;
  13. CREATE TABLE hive.tpcds100.item PROPERTIES("file_format" = "parquet") AS SELECT * FROM tpcds.sf100.item ;
  14. CREATE TABLE hive.tpcds100.promotion PROPERTIES("file_format" = "parquet") AS SELECT * FROM tpcds.sf100.promotion ;
  15. CREATE TABLE hive.tpcds100.reason PROPERTIES("file_format" = "parquet") AS SELECT * FROM tpcds.sf100.reason ;
  16. CREATE TABLE hive.tpcds100.ship_mode PROPERTIES("file_format" = "parquet") AS SELECT * FROM tpcds.sf100.ship_mode ;
  17. CREATE TABLE hive.tpcds100.store PROPERTIES("file_format" = "parquet") AS SELECT * FROM tpcds.sf100.store ;
  18. CREATE TABLE hive.tpcds100.store_returns PROPERTIES("file_format" = "parquet") AS SELECT * FROM tpcds.sf100.store_returns ;
  19. CREATE TABLE hive.tpcds100.store_sales PROPERTIES("file_format" = "parquet") AS SELECT * FROM tpcds.sf100.store_sales ;
  20. CREATE TABLE hive.tpcds100.time_dim PROPERTIES("file_format" = "parquet") AS SELECT * FROM tpcds.sf100.time_dim ;
  21. CREATE TABLE hive.tpcds100.warehouse PROPERTIES("file_format" = "parquet") AS SELECT * FROM tpcds.sf100.warehouse ;
  22. CREATE TABLE hive.tpcds100.web_page PROPERTIES("file_format" = "parquet") AS SELECT * FROM tpcds.sf100.web_page ;
  23. CREATE TABLE hive.tpcds100.web_returns PROPERTIES("file_format" = "parquet") AS SELECT * FROM tpcds.sf100.web_returns ;
  24. CREATE TABLE hive.tpcds100.web_sales PROPERTIES("file_format" = "parquet") AS SELECT * FROM tpcds.sf100.web_sales ;
  25. CREATE TABLE hive.tpcds100.web_site PROPERTIES("file_format" = "parquet") AS SELECT * FROM tpcds.sf100.web_site ;

TPCDS - 图3tip

On a Doris cluster with 3 BE nodes, each with 16 cores, creating a TPCDS 1000 dataset in Hive takes approximately 3 to 4 hours.