AI Decision System
Replayable, offline-verifiable records for AI-assisted go/no-go decisions: experiment promotions, typed model answers and human-approved actions.
TPC-DS derived schemas, queries and runner scripts for Oracle, PostgreSQL, Vertica, ClickHouse, StarRocks and DuckDB — with per-file provenance and a runnable verification harness.
Developer toolsShell · PythonGitHub @litkhaiOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
TPC-DS derived schemas, queries and runners for Oracle, PostgreSQL, Vertica, ClickHouse and StarRocks — 103 queries per engine, per-file provenance, and a verification harness you can run yourself
Taken from the repository README
Loading the full README. The saved excerpt is shown below.
TPC-DS derived schemas, queries and runner scripts for Oracle, PostgreSQL, Vertica, ClickHouse, StarRocks and DuckDB. Oracle, PostgreSQL, Vertica, ClickHouse, StarRocks, DuckDB 를 위한 TPC-DS 파생 스키마·쿼리·실행 스크립트. ⚠️ Results measured with these scripts are not TPC-DS results and are not comparable to published TPC-DS results. See NOTICE.md. ⚠️ 이 스크립트로 측정한 값은 TPC-DS 결과가 아니며 공표된 TPC-DS 결과와 비교할 수 없습니다. NOTICE.md 참고.Read the full README ↗
TPC-DS derived schemas, queries and runner scripts for Oracle, PostgreSQL, Vertica, ClickHouse, StarRocks and DuckDB.
Oracle, PostgreSQL, Vertica, ClickHouse, StarRocks, DuckDB 를 위한 TPC-DS 파생 스키마·쿼리·실행 스크립트.
📖 Documentation: https://litkhai.github.io/tpcds-scripts/ — 문서 사이트
⚠️ Results measured with these scripts are not TPC-DS results and are not comparable to published TPC-DS results. See
NOTICE.md.⚠️ 이 스크립트로 측정한 값은 TPC-DS 결과가 아니며 공표된 TPC-DS 결과와 비교할 수 없습니다.
NOTICE.md참고.
A single place to stand up the TPC-DS workload on six different databases and run it the same way on each. For every engine the repository carries the schema, the full 103-query set in that engine's dialect, a bulk loader that speaks that engine's native tool, and tuning scripts — driven by one common set of commands.
여섯 개의 서로 다른 데이터베이스에 TPC-DS 워크로드를 구성하고 동일한 방식으로 실행하기 위한 저장소입니다. 각 엔진에 대해 스키마, 해당 엔진 방언의 103개 쿼리 전체 세트, 엔진 고유 도구를 사용하는 벌크 로더, 튜닝 스크립트를 제공하며, 공통 명령 세트로 구동합니다.
Two things this repository takes seriously:
이 저장소가 특히 중요하게 다루는 두 가지:
This repository began as a set of Oracle-only TPC-DS scripts: a single
tpcds_oracle_ddl.sql, SQL*Loader control files, and 99 queries rewritten in Oracle
dialect. That work is preserved — the Oracle assets are repo-native and were carried
into the new layout with git mv, so their history is intact — and the repository
was then restructured around a per-engine layout with four more engines added, and DuckDB after that.
이 저장소는 Oracle 전용 TPC-DS 스크립트로 시작했습니다. 단일
tpcds_oracle_ddl.sql, SQL*Loader 컨트롤 파일, Oracle 방언으로 재작성한 99개 쿼리가
그것입니다. 해당 작업은 그대로 보존되어 있으며(Oracle 자산은 리포 고유 자산으로
git mv 로 새 구조에 이동해 이력이 유지됩니다), 이후 엔진별 구조로 재구성하고 네 개
엔진을 추가했으며, 그 뒤에 DuckDB 를 추가했습니다.
| Engine / 엔진 | Schema | Queries | Loader / 로더 | Tuning / 튜닝 | Docker |
|---|---|---|---|---|---|
| Oracle | ✅ | 103 | SQL*Loader (sqlldr) | indexes, DBMS_STATS | ✖ (why / 이유) |
| PostgreSQL | ✅ | 103 | COPY | indexes, ANALYZE | ✅ |
| Vertica | ✅ | 103 | COPY ... DIRECT | Database Designer guidance | ✖ (why / 이유) |
| ClickHouse | ✅ | 103 | INSERT ... FORMAT CSV | schema ORDER BY keys | ✅ |
| StarRocks | ✅ | 103 | Stream Load | ANALYZE, bucketing notes | ✅ |
| DuckDB | ✅ | 103 | COPY | none / 없음 | ✖ (host CLI / 호스트 CLI, guide / 안내) |
103 = the 99 TPC-DS queries, where 14, 23, 24 and 39 each have two formulations.
103 = TPC-DS 99개 쿼리 기준, 14·23·24·39 는 각각 두 가지 정식화를 가집니다.
Run it yourself — one command per engine, no TPC EULA acceptance required:
직접 실행할 수 있습니다. 엔진당 한 명령이며 TPC EULA 동의가 필요하지 않습니다.
tools/verify.sh --all # postgres, clickhouse, starrocks, duckdb
tools/verify.sh --engine postgres
tools/verify-docs.sh # the docs site, in a real browser / 문서 사이트, 실제 브라우저
tools/verify.sh starts the engine from docker/docker-compose.yml (DuckDB: the host
duckdb CLI and a temporary database file, no container), applies the
schema, loads a synthetic fixture generated by tools/make-fixture.py, and runs all
103 queries — then writes results/verification.md. The same thing runs in CI on
every push. What it proves: the SQL runs. What it does not prove: that answers are
correct (the official TPC-DS answer sets are TPC EULA material and are unavailable)
or anything at all about performance.
tools/verify.sh 는 docker/docker-compose.yml 로 엔진을 기동하고(DuckDB 는 호스트의 duckdb
CLI 와 임시 데이터베이스 파일을 사용하며 컨테이너 없음) 스키마를 적용한 뒤,
tools/make-fixture.py 가 생성한 합성 픽스처를 적재하고 103개 쿼리를 전부 실행한 다음
results/verification.md 를 작성합니다. CI 에서도 push 마다 동일하게 실행됩니다.
증명하는 것은 SQL 이 실행된다는 사실이며, 정답 정확성(공식 TPC-DS 정답 세트는 TPC EULA
자산이라 사용 불가)이나 성능은 증명하지 않습니다.
| Engine / 엔진 | Schema / 스키마 | Load / 적재 | Queries / 쿼리 |
|---|---|---|---|
| PostgreSQL 16 | ✅ 25 tables | ✅ 24/24 | ✅ 103/103 |
| ClickHouse 26.7 | ✅ 24 tables | ✅ 24/24 | ✅ 102/103 (+1 known) — see below / 아래 참고 |
| StarRocks 3.x | ✅ 24 tables | ✅ 24/24 | ✅ 103/103 |
| DuckDB 1.5.6 (2026-10-09, host CLI) | ✅ applied | ✅ 24/24 | ✅ 103/103 |
| Oracle | ⬜ not run | ⬜ | ⬜ |
| Vertica | ⬜ not run | ⬜ | ⬜ |
Oracle and Vertica are not covered because neither has an anonymously pullable
container image: Oracle needs container-registry.oracle.com with a licence
acceptance, and no public Vertica CE image exists since the OpenText acquisition.
Both can be verified by hand — see their pages in docs/engines/.
Oracle 과 Vertica 는 익명으로 받을 수 있는 컨테이너 이미지가 없어 제외됩니다. Oracle 은
라이선스 동의와 함께 container-registry.oracle.com 이 필요하고, OpenText 인수 이후
공개된 Vertica CE 이미지가 없습니다. 둘 다 수동으로 검증할 수 있습니다.
docs/engines/ 참고.
The three ClickHouse failures, none of which is a defect in this repository:
ClickHouse 의 세 건 실패이며, 어느 것도 이 저장소의 결함이 아닙니다.
| Query | Cause / 원인 |
|---|---|
| q61 | Divides by a count(*) that the small verification fixture leaves at 0. A fixture-size artifact, not a query or engine defect — the query is correct and runs on a real dataset. Listed in expected_failures() in tools/verify.sh, so a run with only this failure still passes. / 검증 픽스처가 작아 0 이 되는 count(*) 로 나눕니다. 쿼리·엔진 결함이 아니라 픽스처 크기에서 오는 현상입니다. tools/verify.sh 의 expected_failures() 에 등록되어 이 실패만 있으면 통과로 처리됩니다. |
Fixed upstream. These failed on ClickHouse 25.11, which could not resolve an outer CTE alias referenced inside a subquery over a second instance of the same CTE (ctr1.ctr_state). They pass on 26.7. Found by CI pulling a newer image than the local run had. / 상류에서 수정됨. ClickHouse 25.11 에서는 같은 CTE 의 두 번째 인스턴스에 대한 서브쿼리 안의 외부 CTE 별칭을 해석하지 못해 실패했지만 26.7 에서는 통과합니다. CI 가 로컬보다 새 이미지를 받아 발견했습니다. |
Building the harness surfaced seven real bugs that reading the code had not. They are fixed; this is what a "does it actually run" check is for.
이 하네스를 만드는 과정에서 코드 검토로는 드러나지 않은 실제 버그 7건을 발견했습니다. 모두 수정되었으며, "실제로 실행되는가" 검사의 목적이 바로 이것입니다.
| Bug / 버그 | Impact / 영향 |
|---|---|
store_*.dat glob also matched store_sales.dat; customer_* matched customer_address.dat | Loaders concatenated other tables' data into the wrong table. Now matched strictly as _<digits>_<digits>. / 로더가 다른 테이블 데이터를 잘못된 테이블에 이어붙였습니다. |
| StarRocks reorders columns in all 6 fact tables | A positional load wrote ss_ticket_number into ss_item_sk. Now sends an explicit columns: header. / 위치 기반 적재가 값을 잘못된 컬럼에 기록했습니다. |
StarRocks Stream Load used POST | The FE answered {"status":"FAILED","msg":"Not implemented"}. Needs PUT. / FE 가 "Not implemented" 로 응답했습니다. |
StarRocks loader never stripped dsdgen's trailing | | Every row rejected: "too many filtered rows". / 모든 행이 거부되었습니다. |
Upstream StarRocks call_center partitions cc_rec_start_date over 2023-06-01..2023-07-01 | No TPC-DS row (1998–2002) can land there, so the table could never load. Clause removed as a documented adaptation. / TPC-DS 행이 들어갈 수 없어 적재가 불가능했습니다. |
| StarRocks healthcheck only queried the FE | Reported healthy before any BE registered, so CREATE TABLE failed with "Current alive backend is []". / BE 등록 전에 healthy 로 보고했습니다. |
A ; inside this repo's own bilingual SQL header | The mysql client split on it and sent a comment-only fragment StarRocks rejected. ddl.sh now strips comments. / mysql 클라이언트가 그 지점에서 분리해 StarRocks 가 거부하는 조각을 전송했습니다. |
tools/compare-schemas.py reports where the five schemas disagree — currently the
customer.c_last_review_date type, the store.s_tax_precentage spelling, and the
6 reordered StarRocks fact tables.
tools/compare-schemas.py 가 다섯 스키마의 불일치 지점을 보고합니다. 현재
customer.c_last_review_date 타입, store.s_tax_precentage 표기, StarRocks 팩트 테이블
6개의 컬럼 순서입니다.
# 1. Start an engine / 엔진 기동 (PostgreSQL example)
docker compose -f docker/docker-compose.yml --profile postgres up -d
# 2. Connection settings / 접속 설정
cp config/postgres.env.example config/postgres.env
# 3. Get the TPC-DS toolkit and generate data / 툴킷 확보 및 데이터 생성
# Prompts you to accept the TPC EULA. / TPC EULA 동의를 요구합니다.
datagen/fetch-toolkit.sh --community
datagen/generate.sh --sf 1 --out ~/tpcds/sf1
# 4. Schema and load / 스키마 생성 및 적재
bin/ddl.sh --engine postgres
bin/load.sh --engine postgres --data-dir ~/tpcds/sf1
# 5. Run / 실행
bin/run.sh --engine postgres --sf 1 --iterations 3
Results land in results/<timestamp>-<engine>-sf<n>.csv.
결과는 results/<timestamp>-<engine>-sf<n>.csv 에 저장됩니다.
Swap postgres for oracle, vertica, clickhouse, starrocks or duckdb — the
commands are identical. Per-engine setup notes are in docs/engines/.
postgres 를 oracle, vertica, clickhouse, starrocks, duckdb 로 바꾸면 되며
명령은 동일합니다. 엔진별 설정 안내는 docs/engines/ 에 있습니다.
tpcds-scripts/
├── bin/ Common commands / 공통 명령
│ ├── ddl.sh create schema, optionally tuning / 스키마·튜닝 생성
│ ├── load.sh dispatch to the engine's bulk loader / 엔진 로더 위임
│ ├── run.sh execute queries, record timings / 쿼리 실행·시간 기록
│ └── lib/common.sh engine dispatch, config, query selection
├── engines/
│ ├── oracle/ Repo-native / 리포 고유 자산
│ │ ├── ddl/schema.sql 25 tables / 테이블
│ │ ├── load/ctl/*.ctl 24 SQL*Loader templates, named by table
│ │ ├── load/load.sh renders @DATA_DIR@ / @LOG_DIR@, runs sqlldr
│ │ ├── queries/*.sql 103 queries, Oracle dialect
│ │ └── tuning/ indexes.sql, stats.sql
│ ├── postgres/ vertica/ derived from the standard query text
│ ├── duckdb/ the PostgreSQL query set, 2 DuckDB-only fixes / 쿼리 2개만 수정
│ └── clickhouse/ starrocks/ imported verbatim from upstream (Apache-2.0)
├── datagen/
│ ├── fetch-toolkit.sh obtain + build dsdgen (never vendored / 미포함)
│ └── generate.sh produce .dat files at a scale factor
├── docker/docker-compose.yml local engines, one profile each
├── config/*.env.example connection settings templates
├── tools/
│ ├── sync-upstream.sh re-import upstream at pinned commits
│ ├── derive-ddl.sh generate Postgres/Vertica/DuckDB schemas
│ ├── verify.sh start engine, load fixture, run all 103 / 검증
│ ├── verify-docs.sh build docs, check in a real browser / 문서 브라우저 검사
│ ├── make-fixture.py synthetic fixture data (no TPC EULA) / 합성 픽스처
│ └── compare-schemas.py report cross-engine schema divergence / 스키마 불일치
├── docs/ GitHub Pages site / GitHub Pages 사이트
├── results/ run output (git-ignored / git 제외)
├── LICENSE Apache-2.0, for this repository's own code
└── NOTICE.md provenance and TPC licensing / 출처 및 TPC 라이선스
| Engine | Source / 출처 | Change / 변경 |
|---|---|---|
| Oracle | Repo-native, pre-existing | Oracle dialect: rownum <= 100, to_date(...) + N |
| ClickHouse | ClickHouse/ClickHouse tests/benchmarks/tpc-ds/ (Apache-2.0) | Verbatim; q14/23/24/39 split into _1/_2 |
| StarRocks | StarRocks/starrocks .../sql/tpcds/ (Apache-2.0) | Verbatim |
| PostgreSQL, Vertica | Derived from the StarRocks copy of the standard query text | date_add(d, n) → (d ± n); ORDER BY alias expanded in q36/q70/q86 |
| DuckDB | The PostgreSQL set | Identical, except q77 (as returns) and q90 (as "at") |
Re-run tools/sync-upstream.sh to reproduce all of it
from the pinned commits. Full detail, including why some sources were rejected, is
in NOTICE.md.
tools/sync-upstream.sh 를 다시 실행하면 핀 고정 커밋에서
전체를 재생성할 수 있습니다. 일부 소스를 배제한 이유를 포함한 상세 내용은
NOTICE.md 에 있습니다.
The scripts in this repository are Apache-2.0 (LICENSE). The TPC-DS
schema and query text are derived from a TPC benchmark specification and remain
subject to TPC's rights; the data generator is TPC EULA material and is not included
here. Anything you measure is "TPC-DS derived" and must not be presented as a
TPC-DS result. Read NOTICE.md before publishing numbers.
이 저장소의 스크립트는 Apache-2.0 (LICENSE) 입니다. TPC-DS 스키마와 쿼리
원문은 TPC 벤치마크 규격에서 파생된 것으로 TPC 의 권리가 유지됩니다. 데이터 생성기는
TPC EULA 자산이며 여기에 포함되지 않습니다. 측정한 값은 "TPC-DS 파생" 이며 TPC-DS
결과로 제시해서는 안 됩니다. 수치를 공개하기 전에 NOTICE.md 를
읽어보십시오.
The full site is at https://litkhai.github.io/tpcds-scripts/; the sources live in
docs/ and are built with Material for MkDocs.
전체 사이트는 https://litkhai.github.io/tpcds-scripts/ 이며, 소스는
docs/ 에 있고 Material for MkDocs 로 빌드됩니다.
| Section / 섹션 | Pages / 페이지 |
|---|---|
| Getting started | Quick start · Commands · Data generation |
| Engines | Oracle · PostgreSQL · Vertica · ClickHouse · StarRocks · DuckDB |
| Verification | How to verify · Schema divergence |
| Reference | TPC-DS schema · Methodology & fair use · Licensing |
Preview it locally / 로컬 미리보기:
pip install -r requirements-docs.txt
mkdocs serve # http://127.0.0.1:8000
Adding an engine, correcting a dialect adaptation, or reporting a query that fails
on a real dataset are all welcome. See CONTRIBUTING.md —
in particular, do not edit imported query files by hand; change
tools/sync-upstream.sh so the adaptation stays reproducible and documented.
엔진 추가, 방언 변환 수정, 실제 데이터셋에서 실패하는 쿼리 제보 모두 환영합니다.
CONTRIBUTING.md 를 참고하십시오. 특히 임포트된 쿼리 파일을 직접
수정하지 말고 tools/sync-upstream.sh 를 수정해 변환이 재현·문서화되도록 유지하십시오.