zhouqingqing / qpmodel

A Relational Optimizer and Executor
MIT License
66 stars 18 forks source link

[bug] unstable ANALYZE results on distributed tables (with MEMO) #193

Closed zhouqingqing closed 4 years ago

zhouqingqing commented 4 years ago

Occasionally we see distributed tpch query (Q5, Q10) failed due to different cost estimation:

image

One root cause is the bottom scan CE:

    expected: -> PhysicScanTable orders (inccost=1500, cost=1500, rows=225) (actual rows=0)  
    actual:   -> PhysicScanTable orders (inccost=1500, cost=1500, rows=224) (actual rows=0)

This shall be rooted in unstable ANALYZE results on distributed tables.

zhouqingqing commented 4 years ago

https://github.com/zhouqingqing/qpmodel/commit/75ea645496b4366bc9cc817ca50c65dec0cbbd7b failed due to the same issue:

image

zhouruiapple commented 4 years ago

This bug has been fix in bug https://github.com/zhouqingqing/qpmodel/issues/173. Pls see commit https://github.com/zhouqingqing/qpmodel/pull/198.