Open FANNG1 opened 2 years ago
without CBO, we could't do join reorder and choose join type (shuffle or broadcast), besides this, there seems other problems:
I think @leiysky and @zhang2014 have some suggestions before we have CBO.
You can try to put the largest table to the left.
For this case I think the largest table is lineorder
, you can rewrite the query as:
select
d_year, c_nation,
sum(lo_revenue - lo_supplycost) as profit
from
lineorder, dates, customer, supplier, part
where
lo_custkey = c_custkey
and lo_suppkey = s_suppkey
and lo_partkey = p_partkey
and lo_orderdate = d_datekey
and c_region = 'AMERICA'
and s_region = 'AMERICA'
and (p_mfgr = 'MFGR#1')
group by
d_year, c_nation
order by
d_year, c_nation;
yes , we may run pass the query by changing join order manually, but is this behavior expected?
yes , we may run pass the query by changing join order manually, but is this behavior expected?
I have no idea.
Would you please provide the new explain result?
let's talk about it tomorrow :)
cc @xudong963
Search before asking
Version
a6b27a679111b16367a05a3ff6d7ce269f8ea408
What's Wrong?
in ssb test(https://clickhouse.com/docs/en/getting-started/example-datasets/star-schema/), some sql could't finish in server hours.
task Q4.1 for example:
explain result:
explain pipeline output:
How to Reproduce?
1, generate ssb dataset with factor 100 2, run ssb queries, 3.x or 4.x
Are you willing to submit PR?