qpmodel icon indicating copy to clipboard operation
qpmodel copied to clipboard

cte optimization

Open zhouqingqing opened this issue 4 years ago • 0 comments

~~1. introduce sequence plan~~ 2. non-inline plan: (1) don't double count cost: 3 ctes refs equals to 1 cte cost 3. inline plan (mixed with non-inline plan) (1) inline plan happens in the rewrite stage, how to move it to exploration stage? 4. support recursive cte

Results shall be verified with

  1. tpcds - as there are many ctes
  2. tpch (bonus point) - it does not directly have cte, except Q15, but Q2/Q11/Q21 all have big trunk of duplicated subqueries. So there are chances for sharing.

zhouqingqing avatar Apr 17 '20 23:04 zhouqingqing