* Custom cost estimation function for RUM. * While Function support handles matching against specific indexes * and ensuring pushdowns happen properly (see dollar_support), * There is one case that is not yet handled. * If an index has a predicate (partial index), and the *only* clauses * in the query are ones that match the predicate, indxpath.create_index_paths * creates quals that exclude
| 623 | * index for the index to be considered. |
| 624 | */ |
| 625 | static void |
| 626 | extension_rumcostestimate(PlannerInfo *root, IndexPath *path, double loop_count, |
| 627 | Cost *indexStartupCost, Cost *indexTotalCost, |
| 628 | Selectivity *indexSelectivity, double *indexCorrelation, |
| 629 | double *indexPages) |
| 630 | { |
| 631 | bool enableCompositePlannerCosts = EnablePlannerCostSelectivityFromRelOptInfo(root, |
| 632 | path-> |
| 633 | indexinfo |
| 634 | ->rel); |
| 635 | bool forceIndexPushdownCostToZero = !enableCompositePlannerCosts && |
| 636 | ForceUseIndexIfAvailable; |
| 637 | extension_rumcostestimate_core(root, path, loop_count, indexStartupCost, |
| 638 | indexTotalCost, |
| 639 | indexSelectivity, indexCorrelation, indexPages, |
| 640 | &rum_index_routine, forceIndexPushdownCostToZero, |
| 641 | enableCompositePlannerCosts, RumOrderedCostEstimate); |
| 642 | } |
| 643 | |
| 644 | |
| 645 | void |
nothing calls this directly
no test coverage detected