-
由 Chris Hajas 提交于
The experiments and assertions made below were found using the cal_test.py calibration script. We used regression analysis and isolated a single variable to determine the coefficients. This commit makes substantial changes to costing bitmap indexes. Our goal was to choose bitmap index NL joins instead of hash joins, as the execution time of the bitmap NL joins was 10X+ less than hash joins in many cases. Previously, we were multiplying the rebinds by the bitmap page cost which caused the cost to be much more expensive than a hash join in many cases. Now, we no longer multiply the page cost by the number of rebinds, and instead multiply the rebinds by a much smaller rebind cost. Additionally, we took this opportunity to simplify the cost model a bit by removing the separate code path for small vs large NDVs. We did not see the large NDV path being used in joins, and in non-join cases it had very minimal impact on the cost. This functionality is guarded by a traceflag, EopttraceCalibratedBitmapIndexCostModel. In GPDB, it will be enabled by setting `optimizer_cost_model=experimental`. The intent is to enable this by default in the near future. Co-authored-by: NChris Hajas <chajas@pivotal.io> Co-authored-by: NAshuka Xue <axue@pivotal.io>
8a5513ec