TPC-DS 扩展
tpcds 扩展实现了 TPC-DS benchmark 的数据生成器与查询。
安装与加载
tpcds 扩展首次使用时会从官方扩展仓库自动按需加载。
若要手动安装并加载,请执行:
INSTALL tpcds;
LOAD tpcds;
用法
要生成 scale factor 为 1 的数据,请使用:
CALL dsdgen(sf = 1);
要运行查询(例如第 8 条),请使用:
PRAGMA tpcds(8);
| s_store_name | sum(ss_net_profit) |
|---|---|
| able | -10354620.18 |
| ation | -10576395.52 |
| bar | -10625236.01 |
| ese | -10076698.16 |
| ought | -10994052.78 |
仅生成 Schema
将 scale factor 设为 0,即可在不生成数据的情况下仅生成 TPC-DS schema:
CALL dsdgen(sf = 0);
限制
tpcds(⟨query_id⟩) 函数会运行固定的 TPC-DS 查询,并使用预定义的 bind 参数(即 substitution parameters)。
无法通过 tpcds 扩展修改这些查询参数。