PlannerTPC-H — TPCH-Q10

Engine Compare

Accuracy chart, rows processed ?
Scan
Scan
Join Probe
Join
Sort
Sort
Hash Build
Hash
Aggregate
Agg
Distribute
Dist
ClickHouse
Estimation Error
Est Err
Row Operations
Ops
1,596,967
1.6M
Rank
Estimation Error
Est Err
Row Operations
Ops
1,484,360
1.5M
Rank
Estimation Error
Est Err
Row Operations
Ops
16,492
16K
Rank
Estimation Error
Est Err
Row Operations
Ops
250,000
250K
Rank
Estimation Error
Est Err
Row Operations
Ops
45,806
46K
Rank
Estimation Error
Est Err
Row Operations
Ops
0
0
Rank
DuckDB
Estimation Error
Est Err
Row Operations
Ops
1,596,791
1.6M
Rank
Estimation Error
Est Err
Row Operations
Ops
1,692,690
1.7M
Rank
Estimation Error
Est Err
Row Operations
Ops
30,170
30K
Rank
Estimation Error
Est Err
Row Operations
Ops
312,391
312K
Rank
Estimation Error
Est Err
Row Operations
Ops
108,325
108K
Rank
Estimation Error
Est Err
Row Operations
Ops
0
0
Rank
PostgreSQL
Estimation Error
Est Err
Row Operations
Ops
1,596,845
1.6M
Rank
Estimation Error
Est Err
Row Operations
Ops
1,609,400
1.6M
Rank
Estimation Error
Est Err
Row Operations
Ops
138,495
138K
Rank
Estimation Error
Est Err
Row Operations
Ops
366,650
367K
Rank
Estimation Error
Est Err
Row Operations
Ops
108,325
108K
Rank
Estimation Error
Est Err
Row Operations
Ops
0
0
Rank
SQL Server
Estimation Error
Est Err
Row Operations
Ops
1,596,844
1.6M
Rank
Estimation Error
Est Err
Row Operations
Ops
1,572,918
1.6M
Rank
Estimation Error
Est Err
Row Operations
Ops
30,170
30K
Rank
Estimation Error
Est Err
Row Operations
Ops
168,665
169K
Rank
Estimation Error
Est Err
Row Operations
Ops
108,325
108K
Rank
Estimation Error
Est Err
Row Operations
Ops
0
0
Rank

Actual Query Plans

Query Plan per Engine ?
Query Plan
ClickHouse
Estimate    Actual  Operator
       -     16492  PROJECT SUM(l_extendedprice * (1 - l_discount))
       -     16492  SORT SUM(l_extendedprice * (1 - l_discount))
       -     16492  GROUP BY HASH c_custkey, c_name, c_acctbal, c_phone, n_name, c_address, c_comment AGGREGATE SUM(l_extendedprice * (1 - l_discount))
       -     45806  PROJECT 1 - l_discount, l_extendedprice * (1 - l_discount)
       -     45806  INNER JOIN HASH ON c_nationkey = n_nationkey
       -        25  │└TABLE SCAN nation
       -     45806  INNER JOIN HASH ON o_custkey = c_custkey
       -    150000  │└TABLE SCAN customer
       -     45806  INNER JOIN HASH ON l_orderkey = o_orderkey
       -     54194  │└TABLE SCAN orders WHERE (o_orderdate >= '1994-06-01') AND (o_orderdate < '1994-09-01')
       -   1392748  TABLE SCAN lineitem WHERE l_returnflag = 'R'
DuckDB
Estimate    Actual  Operator
       -     30170  SORT SUM(l_extendedprice * (1 - l_discount))
  410170     30170  PROJECT c_custkey, c_name, revenue, c_acctbal, n_name, c_address, c_phone, c_comment
  410170     30170  GROUP BY HASH #0, #1, #2, #3, #4, #5, #6 AGGREGATE SUM(#7)
  410170    108325  PROJECT c_custkey, c_name, c_acctbal, c_phone, n_name, c_address, c_comment, l_extendedprice * (1.000 - l_discount)
  410170    108325  INNER JOIN HASH ON l_orderkey = o_orderkey
  304964     54071  │└INNER JOIN HASH ON c_custkey = o_custkey
  300000     54071   │└TABLE SCAN orders WHERE o_orderdate >= '1994-06-01' AND o_orderdate < '1994-09-01'
  144230    149995   INNER JOIN HASH ON c_nationkey = n_nationkey
      25        25   │└TABLE SCAN nation
  150000    149995   TABLE SCAN customer WHERE c_custkey >= 3
 1999607   1392700  TABLE SCAN lineitem WHERE l_returnflag = 'R'
SQL Server
Estimate    Actual  Operator
   26548     30170  SORT Expr1009
   26548     30170  INNER JOIN HASH ON n_nationkey = c_nationkey
      25        25  │└TABLE SEEK nation
   26548     30170  INNER JOIN HASH ON c_custkey = o_custkey
   26548     30170  │└PROJECT CASE WHEN Expr1015 = 0 THEN NULL ELSE Expr1016 END AS Expr1009
   26548     30170   GROUP BY HASH AGGREGATE COUNT(Expr1010) AS Expr1015, SUM(Expr1010) AS Expr1016
   56888    108325   INNER JOIN HASH ON o_orderkey = l_orderkey
   54113     54071   │└TABLE SEEK orders WHERE o_orderdate >= '1994-06-01' AND o_orderdate < '1994-09-01'
 1389650   1392748   PROJECT l_extendedprice * (1. - l_discount) AS Expr1010
 1389650   1392748   TABLE SCAN lineitem WHERE l_returnflag = 'R'
  150000    150000  TABLE SEEK customer
PostgreSQL
Estimate    Actual  Operator
   51264     30170  SORT SUM(l_extendedprice * ('1' - l_discount))
   51264     30170  GROUP BY SORT c_custkey, n_name AGGREGATE c_name, SUM(l_extendedprice * ('1' - l_discount)), c_acctbal, c_address, c_phone, c_comment
   64080    108325  SORT c_custkey, n_name
   64080    108325  INNER JOIN HASH ON c_nationkey = n_nationkey
      25        25  │└TABLE SCAN nation
   64080    108325  INNER JOIN HASH ON o_custkey = c_custkey
  312500    150000  │└TABLE SCAN customer
   64080    108325  INNER JOIN HASH ON l_orderkey = o_orderkey
   88810     54070  │└TABLE SCAN orders WHERE (o_orderdate >= '1994-06-01') AND (o_orderdate < '1994-09-01')
 1745655   1392750  TABLE SCAN lineitem WHERE l_returnflag = 'R'