PlannerTPC-H — TPCH-Q13

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
1,650,000
1.7M
Rank
Estimation Error
Est Err
Row Operations
Ops
1,500,000
1.5M
Rank
Estimation Error
Est Err
Row Operations
Ops
41
41
Rank
Estimation Error
Est Err
Row Operations
Ops
1,500,000
1.5M
Rank
Estimation Error
Est Err
Row Operations
Ops
1,599,996
1.6M
Rank
Estimation Error
Est Err
Row Operations
Ops
0
Rank
Databricks
Estimation Error
Est Err
Row Operations
Ops
1,649,959
1.6M
Rank
Estimation Error
Est Err
Row Operations
Ops
1,549,963
1.5M
Rank
Estimation Error
Est Err
Row Operations
Ops
42
42
Rank
Estimation Error
Est Err
Row Operations
Ops
1,549,963
1.5M
Rank
Estimation Error
Est Err
Row Operations
Ops
1,700,275
1.7M
Rank
Estimation Error
Est Err
Row Operations
Ops
0
Rank
DuckDB
Estimation Error
Est Err
Row Operations
Ops
1,649,959
1.6M
Rank
Estimation Error
Est Err
Row Operations
Ops
1,549,963
1.5M
Rank
Estimation Error
Est Err
Row Operations
Ops
42
42
Rank
Estimation Error
Est Err
Row Operations
Ops
1,549,963
1.5M
Rank
Estimation Error
Est Err
Row Operations
Ops
1,699,963
1.7M
Rank
Estimation Error
Est Err
Row Operations
Ops
0
Rank
PostgreSQL
Estimation Error
Est Err
Row Operations
Ops
1,649,958
1.6M
Rank
Estimation Error
Est Err
Row Operations
Ops
150,000
150K
Rank
Estimation Error
Est Err
Row Operations
Ops
1,499,958
1.5M
Rank
Estimation Error
Est Err
Row Operations
Ops
344,568
345K
Rank
Estimation Error
Est Err
Row Operations
Ops
516,654
517K
Rank
Estimation Error
Est Err
Row Operations
Ops
1,011,181
1M
Rank
Estimation Error
Est Err
Row Operations
Ops
0
Rank
SQL Server
Estimation Error
Est Err
Row Operations
Ops
1,649,959
1.6M
Rank
Estimation Error
Est Err
Row Operations
Ops
150,000
150K
Rank
Estimation Error
Est Err
Row Operations
Ops
42
42
Rank
Estimation Error
Est Err
Row Operations
Ops
150,000
150K
Rank
Estimation Error
Est Err
Row Operations
Ops
1,649,959
1.6M
Rank
Estimation Error
Est Err
Row Operations
Ops
0
Rank

Actual Query Plans

Query Plan per Engine ?
Query Plan
ClickHouse
Estimate    Actual  Operator
       -        41  PROJECT c_count, a1 AS custdist
       -        41  SORT a1, c_count
       -        41  PROJECT a1, c_count
       -        41  AGGREGATE COUNT() AS a1 GROUP BY HASH c_count
       -     99996  PROJECT a2 AS c_count
       -     99996  AGGREGATE COUNT(a5) AS a2 GROUP BY HASH c_custkey
       -   1500000  PROJECT c_custkey, o_orderkey
       -   1500000  PROJECT c_custkey, a5
       -   1500000  RIGHT OUTER JOIN HASH ON PROJECTION_332.o_custkey = PROJECTION_329.c_custkey
       -    150000  │└PROJECT c_custkey
       -    150000   PROJECT c_custkey
       -    150000   TABLE SCAN customer
       -   1500000  PROJECT o_custkey, o_orderkey AS a5, o_orderkey
       -   1500000  PROJECT o_orderkey, o_custkey
       -   1500000  TABLE SCAN orders WHERE notLike(o_comment,' % special % requests % ')
DuckDB
Estimate    Actual  Operator
       -        42  SORT count_star(), c_orders.c_count
   83106        42  AGGREGATE count_star() GROUP BY HASH #0
  124908    150000  PROJECT c_count
  124908    150000  PROJECT COUNT(o_orderkey)
  124908    150000  AGGREGATE COUNT(#1) GROUP BY HASH #0
  300000   1549963  PROJECT c_custkey, o_orderkey
  300000   1549963  RIGHT OUTER JOIN HASH ON o_custkey = c_custkey
  150000    150000  │└TABLE SCAN customer
  300000   1499959  TABLE SCAN orders WHERE o_comment NOT LIKE ' % special % requests % '
Databricks
Estimate    Actual  Operator
  147000        42  SORT custdist DESC NULLS LAST, c_orders.c_count DESC NULLS LAST
  147000        42  AGGREGATE COUNT(1) GROUP BY HASH c_orders.c_count
  147000       312  DISTRIBUTE HASH ON c_orders.c_count
  147000       312  AGGREGATE COUNT(1) GROUP BY HASH c_orders.c_count
  147000    150000  AGGREGATE COUNT(o_orderkey) GROUP BY HASH c_custkey
 1500000   1549963  LEFT OUTER JOIN HASH ON c_custkey = o_custkey
 1500000    150000  │└DISTRIBUTE HASH ON c_custkey
  150000    150000   TABLE SCAN customer
 1500000   1499959  DISTRIBUTE HASH ON o_custkey
 1500000   1499959  TABLE SCAN orders WHERE  NOT o_comment LIKE ' % special % requests % 'collate UTF8_BINARY
PostgreSQL
Estimate    Actual  Operator
     200        42  SORT COUNT(*), COUNT(o_orderkey)
     200        42  AGGREGATE COUNT(*) GROUP BY HASH COUNT(o_orderkey)
  150000    150000  AGGREGATE COUNT(o_orderkey) GROUP BY SORT c_custkey
  450000    344526  SORT c_custkey
  450000    344526  AGGREGATE PARTIAL COUNT(o_orderkey) GROUP BY HASH c_custkey
  624938    516654  RIGHT OUTER JOIN HASH ON o_custkey = c_custkey
  187500    150000  │└TABLE SEEK customer AS customer
 1874814   1499958  TABLE SCAN orders AS orders WHERE o_comment NOT  LIKE ' % special % requests % '
SQL Server
Estimate    Actual  Operator
      24        42  SORT Expr1007, Expr1006
      24        42  PROJECT CONVERT_IMPLICIT(int,Expr1015,0) AS Expr1007
      24        42  AGGREGATE COUNT(*) AS Expr1015 GROUP BY HASH Expr1006
  150000    150000  PROJECT CASE WHEN Expr1006 IS NULL THEN 0 ELSE Expr1006 END AS Expr1006
  150000    150000  INNER JOIN HASH ON c_custkey = o_custkey
   95173     99996  │└PROJECT CONVERT_IMPLICIT(int,Expr1014,0) AS Expr1006
   95173     99996   AGGREGATE COUNT(*) AS Expr1014 GROUP BY HASH o_custkey
 1500000   1499959   TABLE SCAN orders WHERE  NOT o_comment LIKE ' % special % requests % '
  150000    150000  TABLE SCAN customer