MCPcopy Create free account
hub / github.com/documentdb/documentdb / extension_rumcostestimate

Function extension_rumcostestimate

pg_documentdb/src/index_am/rum.c:625–642  ·  view source on GitHub ↗

* 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

Source from the content-addressed store, hash-verified

623 * index for the index to be considered.
624 */
625static void
626extension_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
645void

Callers

nothing calls this directly

Tested by

no test coverage detected