# TPC-H SF=10 Benchmark Report: Query Accelerator (QA) vs Pure InnoDB + HASH JOIN **Date:** 2025-02-17 **MariaDB Version:** 11.4.10-7 Enterprise, Columnstore 25.10.3 (cron/3028) **Tool:** go-tpc 1.0.7 --- ## 1. Environment ### 1.1 Cluster Topology | Node | Role | Instance Type | vCPUs | RAM | Private IP | | ---- | -------------------- | ------------- | ----: | ------- | ---------- | | mcs1 | Primary CS + MariaDB | c5d.metal | 96 | 192 GiB | 10.0.1.49 | | mcs2 | CS Worker | c5d.metal | 96 | 192 GiB | 10.0.1.134 | | mcs3 | CS Worker | c5d.metal | 96 | 192 GiB | 10.0.1.77 | | mx1 | Load Generator | m5.xlarge | 4 | 16 GiB | 10.0.1.112 | ### 1.2 Configuration **Columnstore.xml (all 3 CS nodes):** - `PmMaxMemorySmallSide = 64G` - `AllowDiskBasedJoin = Y` - `AllowDiskBasedAggregation = Y` **MariaDB (mcs1):** - `max_connections = 1000` **Data:** - TPC-H Scale Factor 10 (~10 GB raw data, ~60M rows in lineitem) **Composite Indexes (as per QA MTR test):** - `partsupp(PS_PARTKEY, PS_SUPPKEY)` - `lineitem(l_orderkey, l_suppkey)` - `orders(o_orderkey, o_orderstatus)` - `supplier(s_nationkey, s_suppkey, s_name)` **Histograms (5× default):** - lineitem: 50 - orders: 25 - partsupp: 15 - part: 10 ### 1.3 QA Configuration (QA Run) ```sql SET GLOBAL columnstore_innodb_queries_use_mcs = ON; SET GLOBAL columnstore_unstable_optimizer = ON; SET GLOBAL optimizer_switch = '...'; -- Full RBO string from MTR test SET GLOBAL columnstore_query_accel_parallel_factor = 50; calsettrace(1); -- on all 3 CS nodes ``` **Verification:** `mcs_get_plan('rules')` returned `parallel_ces` ✅ ### 1.4 noQA Configuration (noQA Run) ```sql SET GLOBAL columnstore_innodb_queries_use_mcs = OFF; SET GLOBAL columnstore_unstable_optimizer = OFF; SET GLOBAL optimizer_switch = default; SET GLOBAL join_cache_level = 3; SET GLOBAL join_buffer_size = 3221225472; -- 3 GiB SET GLOBAL optimizer_switch = 'optimize_join_buffer_size=off'; -- No calsettrace ``` **Verification:** `mcs_get_plan('rules')` returned `NULL` ✅ --- ## 2. Query Execution Times | Query | QA (s) | noQA (s) | Speedup (noQA/QA) | | ----- | ------: | -------------: | ----------------------: | | Q1 | 22.45 | 105.86 | **4.7×** | | Q2 | 3.12 | >600 (TIMEOUT) | **>192×** | | Q3 | 8.49 | 30.77 | **3.6×** | | Q4 | 7.62 | 81.50 | **10.7×** | | Q5 | 8.49 | 32.38 | **3.8×** | | Q6 | 6.21 | 20.57 | **3.3×** | | Q7 | 8.82 | 40.16 | **4.6×** | | Q8 | 9.50 | 36.34 | **3.8×** | | Q9 | 13.05 | 91.17 | **7.0×** | | Q10 | 9.16 | 34.59 | **3.8×** | | Q11 | 5.34 | 29.23 | **5.5×** | | Q12 | 8.15 | 30.84 | **3.8×** | | Q13 | 2.58 | 72.11 | **27.9×** | | Q14 | 6.48 | 20.23 | **3.1×** | | Q15 | 12.85 | 44.73 | **3.5×** | | Q16 | 1.04 | 5.60 | **5.4×** | | Q17 | 11.98 | >600 (TIMEOUT) | **>50×** | | Q18 | 14.26 | 62.51 | **4.4×** | | Q19 | 6.68 | 40.43 | **6.1×** | | Q20 | 9.43 | >600 (TIMEOUT) | **>64×** | | Q21 | 1029.45 | 228.64 | **0.22× (noQA faster)** | | Q22 | 2.65 | >600 (TIMEOUT) | **>226×** | --- ## 3. Resource Utilization (mcs1) mcs2/mcs3 were idle in both scenarios. | Resource | QA Avg | QA P95 | noQA Avg | noQA P95 | | ------------------ | ------ | ------ | -------- | -------- | | CPU (%) | 10.4 | 34.7 | 2.0 | 3.1 | | RAM (% of 192 GiB) | 18.3 | 60.7 | 7.4 | 8.9 | | Disk Read (MB/s) | 388 | 1,589 | 719 | 1,320 | | Disk Write (MB/s) | 53 | 455 | 0.9 | 0.2 | --- ## 4. DNF (Did Not Finish) Query Estimation Estimated via `Handler_read_rnd_next` sampling (2 samples, 30s apart) during execution. Throughput = Δrows/Δtime. Completion time = total table rows (lineitem=60M × SF10 × join multiplier) / throughput. | Query | Throughput (rows/s) | Est. Completion Time | | ----- | ------------------: | -------------------: | | Q2 | 9,259 | >>1 hour | | Q17 | 3,722,276 | ~4.5 hours | | Q20 | 6,331,829 | ~2.6 hours | | Q22 | 8,420,281 | ~2 hours | --- ## 5. Conclusions 1. **QA provides 3×–226× speedup on 21/22 queries.** 4 noQA queries DNF (>600s, est. 2–4+ hours). 2. **QA effectively uses hardware** — 94% peak CPU, 116 GiB RAM. noQA barely touches it (3% CPU, 17 GiB). 3. **HASH JOIN tweak** applied for noQA — QA still outperformed on all but Q21.