PlannerTPC-H — TPCH-Q15

Engine Compare

Accuracy chart, rows processed ?
Scan
Scan
Seek
Seek
Join Probe
Join
Sort
Sort
Hash Build
Hash
Aggregate
Agg
Distribute
Dist
ClickHouse
Estimation Error
Est Err
Row Operations
Ops
236,297
236K
Rank
Estimation Error
Est Err
Row Operations
Ops
10,000
10K
Rank
Estimation Error
Est Err
Row Operations
Ops
1
1
Rank
Estimation Error
Est Err
Row Operations
Ops
1
1
Rank
Estimation Error
Est Err
Row Operations
Ops
226,297
226K
Rank
Estimation Error
Est Err
Row Operations
Ops
0
Rank
Databricks
Estimation Error
Est Err
Row Operations
Ops
228,106
228K
Rank
Estimation Error
Est Err
Row Operations
Ops
1
1
Rank
Estimation Error
Est Err
Row Operations
Ops
0
0
Rank
Estimation Error
Est Err
Row Operations
Ops
1,809
1.8K
Rank
Estimation Error
Est Err
Row Operations
Ops
256,295
256K
Rank
Estimation Error
Est Err
Row Operations
Ops
0
Rank
DuckDB
Estimation Error
Est Err
Row Operations
Ops
246,298
246K
Rank
Estimation Error
Est Err
Row Operations
Ops
10,001
10K
Rank
Estimation Error
Est Err
Row Operations
Ops
1
1
Rank
Estimation Error
Est Err
Row Operations
Ops
2
2
Rank
Estimation Error
Est Err
Row Operations
Ops
236,298
236K
Rank
Estimation Error
Est Err
Row Operations
Ops
0
Rank
PostgreSQL
Estimation Error
Est Err
Row Operations
Ops
236,298
236K
Rank
Estimation Error
Est Err
Row Operations
Ops
1
1
Rank
Estimation Error
Est Err
Row Operations
Ops
1
1
Rank
Estimation Error
Est Err
Row Operations
Ops
29,985
30K
Rank
Estimation Error
Est Err
Row Operations
Ops
1
1
Rank
Estimation Error
Est Err
Row Operations
Ops
266,282
266K
Rank
Estimation Error
Est Err
Row Operations
Ops
0
Rank
SQL Server
Estimation Error
Est Err
Row Operations
Ops
226,299
226K
Rank
Estimation Error
Est Err
Row Operations
Ops
1
1
Rank
Estimation Error
Est Err
Row Operations
Ops
2
2
Rank
Estimation Error
Est Err
Row Operations
Ops
901
901
Rank
Estimation Error
Est Err
Row Operations
Ops
2
2
Rank
Estimation Error
Est Err
Row Operations
Ops
226,297
226K
Rank
Estimation Error
Est Err
Row Operations
Ops
0
Rank

Actual Query Plans

Query Plan per Engine ?
Query Plan
ClickHouse
Estimate    Actual  Operator
       -         1  PROJECT s_suppkey, s_name, s_address, s_phone, total_revenue
       -         1  SORT s_suppkey
       -         1  PROJECT s_suppkey, s_name, s_address, s_phone, total_revenue
       -         1  PROJECT s_suppkey, s_name, s_address, s_phone, total_revenue
       -         1  INNER JOIN HASH ON PROJECTION_357.s_suppkey = PROJECTION_351.l_suppkey
       -         1  │└PROJECT l_suppkey AS supplier_no, a5 AS total_revenue
       -         1   FILTER (a5 = '1743799.3741') AS a3
       -     10000   AGGREGATE SUM(a9) AS a5 GROUP BY HASH l_suppkey
       -    226297   PROJECT l_suppkey, l_extendedprice * (1 - l_discount) AS a9
       -    226297   PROJECT l_suppkey, l_extendedprice, l_discount
       -    226297   TABLE SCAN lineitem WHERE (l_shipdate >= '1997-09-01') AND (l_shipdate < '1997-12-01')
       -     10000  PROJECT s_suppkey, s_name, s_address, s_phone
       -     10000  PROJECT s_suppkey, s_name, s_address, s_phone
       -     10000  TABLE SCAN supplier
DuckDB
Estimate    Actual  Operator
       -         1  SEQUENCE
    8565     10000  ├─MATERIALISE AS m_revenue
    8565     10000   AGGREGATE sum_no_overflow #1 GROUP BY HASH #0
 1200243    226297   PROJECT l_suppkey, l_extendedprice * (1.00 - l_discount)
 1200243    226297   TABLE SCAN lineitem WHERE l_shipdate >= '1997-09-01' AND l_shipdate < '1997-12-01'
       -         1  └─SORT s_suppkey
       3         1    INNER JOIN HASH ON s_suppkey = supplier_no
       3         1    │└INNER JOIN HASH ON total_revenue = SUBQUERY
       1         1     │└PROJECT CASE WHEN (#1 > 1) THEN ("error"('More than one row returned by a subquery used as an expression - scalar subqueries can only return a single row. Use "SET scalar_subquery_error_on_multiple_rows=false" to revert to previous behavior of returning a random row.')) ELSE #0 END
       -         1      AGGREGATE "first" #0, count_star()
       -         1      AGGREGATE MAX(#0)
    8565     10000      PROJECT total_revenue
    8565     10000      SCAN MATERIALISED revenue
    8565     10000     SCAN MATERIALISED revenue
   10000         1    TABLE SCAN supplier
Databricks
Estimate    Actual  Operator
       1         1  SEQUENCE
     361         1  ├─DISTRIBUTE HASH ON s_suppkey ASC NULLS FIRST
     361         1   INNER JOIN HASH ON s_suppkey = revenue.supplier_no
   10000      1809   │└TABLE SCAN supplier
     361         1   DISTRIBUTE GATHER
     345         1   FILTER 
   10000     10000   AGGREGATE SUM(l_extendedprice * (1BD - l_discount)) GROUP BY HASH l_suppkey
   10000     19997   DISTRIBUTE HASH ON l_suppkey
   10000     19997   AGGREGATE SUM(l_extendedprice * (1BD - l_discount)) GROUP BY HASH l_suppkey
 6000000    226297   TABLE SCAN lineitem WHERE (l_shipdate >= DATE'1997-09-01') AND (l_shipdate < DATE'1997-12-01')
       1         1  └─AGGREGATE MAX(revenue.total_revenue)
       1         1    DISTRIBUTE GATHER
       1         1    AGGREGATE MAX(revenue.total_revenue)
       1     10000    AGGREGATE SUM(l_extendedprice * (1BD - l_discount)) GROUP BY HASH l_suppkey
PostgreSQL
Estimate    Actual  Operator
      50         1  SEQUENCE
    9969     10000  ├─AGGREGATE SUM(l_extendedprice * ('1' - l_discount)) GROUP BY SORT l_suppkey
   29907     29985   SORT l_suppkey
   29907     29985   AGGREGATE PARTIAL SUM(l_extendedprice * ('1' - l_discount)) GROUP BY HASH l_suppkey
  288516    226296   TABLE SCAN lineitem AS lineitem WHERE (l_shipdate >= '1997-09-01') AND (l_shipdate < '1997-12-01')
       1         1  ├─AGGREGATE MAX(total_revenue)
    9969     10000   SCAN MATERIALISED revenue
      50         1  └─CROSS JOIN LOOP ON 
      50         1    │└SCAN MATERIALISED revenue
       1         1    TABLE SEEK supplier AS supplier
SQL Server
Estimate    Actual  Operator
       1         1  INNER JOIN LOOP ON ColStoreLoc1000 = ColStoreLoc1000
       1         1  │└TABLE SCAN supplier
       1         1  INNER JOIN LOOP ON l_suppkey = s_suppkey
       1         1  │└TABLE SEEK supplier
       1         1  SORT l_suppkey
       1         1  LIMIT 0
       1       900  SORT Expr1006
    8998     10000  FILTER Expr1006 IS NOT NULL
    9998     10000  AGGREGATE SUM(Expr1022) AS Expr1006 GROUP BY HASH l_suppkey
  227115    226297  PROJECT l_extendedprice * (1. - l_discount) AS Expr1022
  227115    226297  TABLE SCAN lineitem WHERE l_shipdate >= '1997-09-01' AND l_shipdate < '1997-12-01'