PostgreSQL Source Code
git master
|
#include "postgres.h"
#include <limits.h>
#include <math.h>
#include "access/sysattr.h"
#include "access/tsmapi.h"
#include "catalog/pg_class.h"
#include "catalog/pg_operator.h"
#include "catalog/pg_proc.h"
#include "foreign/fdwapi.h"
#include "miscadmin.h"
#include "nodes/makefuncs.h"
#include "nodes/nodeFuncs.h"
#include "nodes/supportnodes.h"
#include "optimizer/appendinfo.h"
#include "optimizer/clauses.h"
#include "optimizer/cost.h"
#include "optimizer/geqo.h"
#include "optimizer/inherit.h"
#include "optimizer/optimizer.h"
#include "optimizer/pathnode.h"
#include "optimizer/paths.h"
#include "optimizer/plancat.h"
#include "optimizer/planner.h"
#include "optimizer/restrictinfo.h"
#include "optimizer/tlist.h"
#include "parser/parse_clause.h"
#include "parser/parsetree.h"
#include "partitioning/partbounds.h"
#include "partitioning/partprune.h"
#include "rewrite/rewriteManip.h"
#include "utils/lsyscache.h"
Go to the source code of this file.
Data Structures | |
struct | pushdown_safety_info |
Typedefs | |
typedef struct pushdown_safety_info | pushdown_safety_info |
Variables | |
bool | enable_geqo = false |
int | geqo_threshold |
int | min_parallel_table_scan_size |
int | min_parallel_index_scan_size |
set_rel_pathlist_hook_type | set_rel_pathlist_hook = NULL |
join_search_hook_type | join_search_hook = NULL |
typedef struct pushdown_safety_info pushdown_safety_info |
|
static |
Definition at line 2037 of file allpaths.c.
References AppendPath::first_partial_path, IsA, lappend(), list_concat(), list_copy(), list_copy_tail(), list_truncate(), Path::parallel_aware, AppendPath::path, AppendPath::subpaths, and MergeAppendPath::subpaths.
Referenced by add_paths_to_append_rel(), and generate_orderedappend_paths().
void add_paths_to_append_rel | ( | PlannerInfo * | root, |
RelOptInfo * | rel, | ||
List * | live_childrels | ||
) |
Definition at line 1287 of file allpaths.c.
References accumulate_append_subpath(), add_partial_path(), add_path(), Assert(), bms_equal(), RelOptInfo::cheapest_total_path, compare_pathkeys(), RelOptInfo::consider_parallel, create_append_path(), enable_parallel_append, fls(), for_each_from, generate_orderedappend_paths(), get_cheapest_parallel_safe_total_inner(), get_cheapest_parameterized_child_path(), lappend(), lfirst, linitial, list_length(), list_make1, Max, max_parallel_workers_per_gather, Min, NIL, Path::parallel_workers, Path::param_info, RelOptInfo::partial_pathlist, AppendPath::path, PATH_REQ_OUTER, Path::pathkeys, PATHKEYS_EQUAL, RelOptInfo::pathlist, Path::rows, subpath(), and Path::total_cost.
Referenced by apply_scanjoin_target_to_paths(), create_partitionwise_grouping_paths(), generate_partitionwise_join_paths(), and set_append_rel_pathlist().
|
static |
Definition at line 2387 of file allpaths.c.
References OpExpr::args, TargetEntry::expr, find_window_run_conditions(), if(), IsA, linitial, list_length(), list_nth(), lsecond, TargetEntry::resno, Query::targetList, and Var::varattno.
Referenced by set_subquery_pathlist().
|
static |
Definition at line 3639 of file allpaths.c.
References contain_volatile_functions(), Query::distinctClause, TargetEntry::expr, expression_returns_set(), Query::hasDistinctOn, Query::hasTargetSRFs, Query::hasWindowFuncs, InvalidOid, lfirst, TargetEntry::resjunk, TargetEntry::resno, targetIsInAllPartitionLists(), targetIsInSortList(), Query::targetList, and pushdown_safety_info::unsafeColumns.
Referenced by subquery_is_pushdown_safe().
|
static |
Definition at line 3707 of file allpaths.c.
References elog, ERROR, TargetEntry::expr, exprType(), lfirst, lfirst_oid, list_head(), lnext(), TargetEntry::resjunk, TargetEntry::resno, and pushdown_safety_info::unsafeColumns.
Referenced by subquery_is_pushdown_safe().
int compute_parallel_worker | ( | RelOptInfo * | rel, |
double | heap_pages, | ||
double | index_pages, | ||
int | max_workers | ||
) |
Definition at line 4122 of file allpaths.c.
References Max, Min, min_parallel_index_scan_size, min_parallel_table_scan_size, RelOptInfo::rel_parallel_workers, RELOPT_BASEREL, and RelOptInfo::reloptkind.
Referenced by cost_index(), create_partial_bitmap_paths(), create_plain_partial_paths(), and plan_create_index_workers().
void create_partial_bitmap_paths | ( | PlannerInfo * | root, |
RelOptInfo * | rel, | ||
Path * | bitmapqual | ||
) |
Definition at line 4086 of file allpaths.c.
References add_partial_path(), compute_bitmap_pages(), compute_parallel_worker(), create_bitmap_heap_path(), RelOptInfo::lateral_relids, and max_parallel_workers_per_gather.
Referenced by create_index_paths().
|
static |
Definition at line 799 of file allpaths.c.
References add_partial_path(), compute_parallel_worker(), create_seqscan_path(), max_parallel_workers_per_gather, and RelOptInfo::pages.
Referenced by set_plain_rel_pathlist().
|
static |
Definition at line 2187 of file allpaths.c.
References arg, OpExpr::args, bms_add_member(), BTEqualStrategyNumber, BTGreaterEqualStrategyNumber, BTGreaterStrategyNumber, BTLessEqualStrategyNumber, BTLessStrategyNumber, DatumGetPointer, FirstLowInvalidHeapAttributeNumber, get_func_support(), get_op_btree_interpretation(), get_opfamily_member(), OpExpr::inputcollid, InvalidOid, is_pseudo_constant_clause(), IsA, lappend(), lfirst, linitial, list_nth(), lsecond, make_opclause(), MONOTONICFUNC_BOTH, MONOTONICFUNC_DECREASING, MONOTONICFUNC_INCREASING, MONOTONICFUNC_NONE, OidFunctionCall1, OidIsValid, OpExpr::opcollid, OpBtreeInterpretation::opfamily_id, OpBtreeInterpretation::oplefttype, OpExpr::opno, OpExpr::opresulttype, OpExpr::opretset, OpBtreeInterpretation::oprighttype, PointerGetDatum, res, WindowClause::runCondition, OpBtreeInterpretation::strategy, T_SupportRequestWFuncMonotonic, SupportRequestWFuncMonotonic::type, SupportRequestWFuncMonotonic::window_clause, SupportRequestWFuncMonotonic::window_func, Query::windowClause, WindowFunc::winfnoid, and WindowFunc::winref.
Referenced by check_and_push_window_quals().
void generate_gather_paths | ( | PlannerInfo * | root, |
RelOptInfo * | rel, | ||
bool | override_rows | ||
) |
Definition at line 2969 of file allpaths.c.
References add_path(), create_gather_merge_path(), create_gather_path(), lfirst, linitial, NIL, Path::parallel_workers, RelOptInfo::partial_pathlist, GatherMergePath::path, RelOptInfo::reltarget, Path::rows, and subpath().
Referenced by create_partial_distinct_paths(), and generate_useful_gather_paths().
|
static |
Definition at line 1675 of file allpaths.c.
References accumulate_append_subpath(), add_path(), Assert(), BackwardScanDirection, RelOptInfo::boundinfo, build_partition_pathkeys(), RelOptInfo::cheapest_total_path, create_append_path(), create_merge_append_path(), ForwardScanDirection, get_cheapest_fractional_path_for_pathkeys(), get_cheapest_path_for_pathkeys(), get_singleton_append_subpath(), IS_SIMPLE_REL, lappend(), lcons(), lfirst, RelOptInfo::live_parts, NIL, Path::param_info, RelOptInfo::part_scheme, partitions_are_ordered(), pathkeys_contained_in(), RelOptInfo::pathlist, STARTUP_COST, TOTAL_COST, and PlannerInfo::tuple_fraction.
Referenced by add_paths_to_append_rel().
void generate_partitionwise_join_paths | ( | PlannerInfo * | root, |
RelOptInfo * | rel | ||
) |
Definition at line 4210 of file allpaths.c.
References add_paths_to_append_rel(), Assert(), check_stack_depth(), RelOptInfo::consider_partitionwise_join, IS_DUMMY_REL, IS_JOIN_REL, IS_PARTITIONED_REL, lappend(), list_free(), mark_dummy_rel(), NIL, RelOptInfo::nparts, RelOptInfo::part_rels, and set_cheapest().
Referenced by merge_clump(), and standard_join_search().
void generate_useful_gather_paths | ( | PlannerInfo * | root, |
RelOptInfo * | rel, | ||
bool | override_rows | ||
) |
Definition at line 3107 of file allpaths.c.
References add_path(), Assert(), create_gather_merge_path(), create_incremental_sort_path(), create_sort_path(), enable_incremental_sort, generate_gather_paths(), get_useful_pathkeys_for_relation(), lfirst, linitial, list_length(), NIL, Path::parallel_workers, RelOptInfo::partial_pathlist, GatherMergePath::path, Path::pathkeys, pathkeys_count_contained_in(), RelOptInfo::reltarget, Path::rows, and subpath().
Referenced by apply_scanjoin_target_to_paths(), gather_grouping_paths(), merge_clump(), set_rel_pathlist(), and standard_join_search().
|
static |
Definition at line 1949 of file allpaths.c.
References Assert(), bms_equal(), bms_is_subset(), compare_path_costs(), get_cheapest_path_for_pathkeys(), lfirst, NIL, PATH_REQ_OUTER, RelOptInfo::pathlist, reparameterize_path(), and TOTAL_COST.
Referenced by add_paths_to_append_rel().
Definition at line 2083 of file allpaths.c.
References Assert(), IsA, linitial, list_length(), Path::parallel_aware, AppendPath::subpaths, and MergeAppendPath::subpaths.
Referenced by generate_orderedappend_paths().
|
static |
Definition at line 3039 of file allpaths.c.
References lappend(), lfirst, list_copy(), list_length(), list_truncate(), NIL, PathKey::pk_eclass, PlannerInfo::query_pathkeys, and relation_can_be_sorted_early().
Referenced by generate_useful_gather_paths().
|
static |
Definition at line 2143 of file allpaths.c.
References RELOPT_BASEREL, RelOptInfo::reloptkind, PlannerInfo::simple_rel_array, and PlannerInfo::simple_rel_array_size.
Referenced by set_subquery_pathlist().
RelOptInfo* make_one_rel | ( | PlannerInfo * | root, |
List * | joinlist | ||
) |
Definition at line 155 of file allpaths.c.
References PlannerInfo::all_baserels, Assert(), bms_add_member(), bms_equal(), IS_DUMMY_REL, IS_SIMPLE_REL, make_rel_from_joinlist(), RelOptInfo::pages, RelOptInfo::relid, RelOptInfo::relids, RELOPT_BASEREL, RelOptInfo::reloptkind, set_base_rel_consider_startup(), set_base_rel_pathlists(), set_base_rel_sizes(), PlannerInfo::simple_rel_array, PlannerInfo::simple_rel_array_size, and PlannerInfo::total_table_pages.
Referenced by query_planner().
|
static |
Definition at line 3241 of file allpaths.c.
References elog, enable_geqo, ERROR, find_base_rel(), geqo(), geqo_threshold, PlannerInfo::initial_rels, IsA, join_search_hook, lappend(), lfirst, linitial, list_length(), NIL, nodeTag, and standard_join_search().
Referenced by make_one_rel().
|
static |
Definition at line 3783 of file allpaths.c.
References Assert(), RestrictInfo::clause, contain_leaked_vars(), contain_subplans(), contain_volatile_functions(), contain_window_function(), if(), IsA, lfirst, list_free(), pull_var_clause(), PVC_INCLUDE_PLACEHOLDERS, pushdown_safety_info::unsafeColumns, pushdown_safety_info::unsafeLeaky, pushdown_safety_info::unsafeVolatile, Var::varattno, and Var::varno.
Referenced by set_subquery_pathlist().
|
static |
Definition at line 3922 of file allpaths.c.
References Assert(), elog, ERROR, IsA, SetOperationStmt::larg, nodeTag, SetOperationStmt::rarg, rt_fetch, Query::rtable, RangeTblRef::rtindex, RangeTblEntry::subquery, and subquery_push_qual().
Referenced by subquery_push_qual().
|
static |
Definition at line 3572 of file allpaths.c.
References Assert(), elog, ERROR, IsA, SetOperationStmt::larg, nodeTag, SetOperationStmt::op, SetOperationStmt::rarg, rt_fetch, Query::rtable, RangeTblRef::rtindex, SETOP_EXCEPT, RangeTblEntry::subquery, and subquery_is_pushdown_safe().
Referenced by subquery_is_pushdown_safe().
|
static |
Definition at line 3974 of file allpaths.c.
References RelOptInfo::baserestrictinfo, bms_is_member(), RestrictInfo::clause, contain_volatile_functions(), Query::distinctClause, TargetEntry::expr, exprCollation(), expression_returns_set(), PathTarget::exprs, exprType(), exprTypmod(), FirstLowInvalidHeapAttributeNumber, Query::hasDistinctOn, Query::hasTargetSRFs, if(), lfirst, makeNullConst(), pull_varattnos(), RelOptInfo::relid, RelOptInfo::reltarget, TargetEntry::resjunk, TargetEntry::resno, TargetEntry::ressortgroupref, Query::setOperations, and Query::targetList.
Referenced by set_subquery_pathlist().
|
static |
Definition at line 1217 of file allpaths.c.
References add_paths_to_append_rel(), PlannerInfo::append_rel_list, AppendRelInfo::child_relid, RelOptInfo::consider_parallel, IS_DUMMY_REL, lappend(), lfirst, NIL, AppendRelInfo::parent_relid, set_rel_pathlist(), PlannerInfo::simple_rel_array, and PlannerInfo::simple_rte_array.
Referenced by set_rel_pathlist().
|
static |
Definition at line 949 of file allpaths.c.
References add_child_rel_equivalences(), adjust_appendrel_attrs(), PlannerInfo::append_rel_list, Assert(), RelOptInfo::attr_needed, RelOptInfo::attr_widths, check_stack_depth(), AppendRelInfo::child_relid, RelOptInfo::consider_parallel, RelOptInfo::consider_partitionwise_join, enable_partitionwise_join, PathTarget::exprs, exprType(), exprTypmod(), find_base_rel(), forboth, get_typavgwidth(), PlannerInfo::glob, RelOptInfo::has_eclass_joins, has_useful_pathkeys(), i, InvalidAttrNumber, IS_DUMMY_REL, IS_SIMPLE_REL, IsA, RelOptInfo::joininfo, lfirst, RelOptInfo::max_attr, RelOptInfo::min_attr, palloc0(), PlannerGlobal::parallelModeOK, AppendRelInfo::parent_relid, pfree(), relation_excluded_by_constraints(), RelOptInfo::relid, RangeTblEntry::relkind, RELOPT_BASEREL, RELOPT_OTHER_MEMBER_REL, RelOptInfo::reloptkind, RelOptInfo::reltarget, RelOptInfo::rows, set_dummy_rel_pathlist(), set_rel_consider_parallel(), set_rel_size(), PlannerInfo::simple_rte_array, RelOptInfo::tuples, Var::varattno, Var::varno, and PathTarget::width.
Referenced by set_rel_size().
|
static |
Definition at line 251 of file allpaths.c.
References bms_get_singleton_member(), RelOptInfo::consider_param_startup, find_base_rel(), JOIN_ANTI, PlannerInfo::join_info_list, JOIN_SEMI, SpecialJoinInfo::jointype, lfirst, and SpecialJoinInfo::syn_righthand.
Referenced by make_one_rel().
|
static |
Definition at line 337 of file allpaths.c.
References Assert(), RelOptInfo::relid, RELOPT_BASEREL, RelOptInfo::reloptkind, set_rel_pathlist(), PlannerInfo::simple_rel_array, PlannerInfo::simple_rel_array_size, and PlannerInfo::simple_rte_array.
Referenced by make_one_rel().
|
static |
Definition at line 294 of file allpaths.c.
References Assert(), PlannerInfo::glob, PlannerGlobal::parallelModeOK, RelOptInfo::relid, RELOPT_BASEREL, RelOptInfo::reloptkind, set_rel_consider_parallel(), set_rel_size(), PlannerInfo::simple_rel_array, PlannerInfo::simple_rel_array_size, and PlannerInfo::simple_rte_array.
Referenced by make_one_rel().
|
static |
Definition at line 2783 of file allpaths.c.
References add_path(), create_ctescan_path(), PlannerInfo::cte_plan_ids, RangeTblEntry::ctelevelsup, Query::cteList, RangeTblEntry::ctename, CommonTableExpr::ctename, elog, ERROR, PlannerInfo::glob, RelOptInfo::lateral_relids, lfirst, list_length(), list_nth(), list_nth_int(), PlannerInfo::parent_root, PlannerInfo::parse, Plan::plan_rows, set_cte_size_estimates(), and PlannerGlobal::subplans.
Referenced by set_rel_size().
|
static |
Definition at line 2117 of file allpaths.c.
References add_path(), create_append_path(), RelOptInfo::lateral_relids, NIL, RelOptInfo::partial_pathlist, RelOptInfo::pathlist, RelOptInfo::reltarget, RelOptInfo::rows, set_cheapest(), and PathTarget::width.
Referenced by set_append_rel_size(), set_rel_size(), and set_subquery_pathlist().
|
static |
Definition at line 931 of file allpaths.c.
References RelOptInfo::fdwroutine, FdwRoutine::GetForeignPaths, and RangeTblEntry::relid.
Referenced by set_rel_pathlist().
|
static |
Definition at line 907 of file allpaths.c.
References clamp_row_est(), RelOptInfo::fdwroutine, FdwRoutine::GetForeignRelSize, Max, RangeTblEntry::relid, RelOptInfo::rows, set_foreign_size_estimates(), and RelOptInfo::tuples.
Referenced by set_rel_size().
|
static |
Definition at line 2671 of file allpaths.c.
References add_path(), build_expression_pathkey(), create_functionscan_path(), PathTarget::exprs, RangeTblEntry::funcordinality, IsA, RelOptInfo::lateral_relids, lfirst, RelOptInfo::max_attr, NIL, RelOptInfo::relid, RelOptInfo::relids, RelOptInfo::reltarget, Var::varattno, Var::varlevelsup, and Var::varno.
Referenced by set_rel_pathlist().
|
static |
Definition at line 2850 of file allpaths.c.
References add_path(), create_namedtuplestorescan_path(), RelOptInfo::lateral_relids, set_cheapest(), and set_namedtuplestore_size_estimates().
Referenced by set_rel_size().
|
static |
Definition at line 769 of file allpaths.c.
References add_path(), RelOptInfo::consider_parallel, create_index_paths(), create_plain_partial_paths(), create_seqscan_path(), create_tidscan_paths(), and RelOptInfo::lateral_relids.
Referenced by set_rel_pathlist().
|
static |
Definition at line 577 of file allpaths.c.
References check_index_predicates(), and set_baserel_size_estimates().
Referenced by set_rel_size().
|
static |
Definition at line 594 of file allpaths.c.
References TableSampleClause::args, Assert(), RelOptInfo::baserestrictinfo, castNode, RelOptInfo::consider_parallel, PathTarget::exprs, RelOptInfo::fdwroutine, func_parallel(), RangeTblEntry::functions, get_rel_persistence(), PlannerInfo::glob, is_parallel_safe(), IS_SIMPLE_REL, FdwRoutine::IsForeignScanParallelSafe, limit_needed(), PlannerGlobal::parallelModeOK, RangeTblEntry::relid, RangeTblEntry::relkind, RelOptInfo::reltarget, RTE_CTE, RTE_FUNCTION, RTE_JOIN, RTE_NAMEDTUPLESTORE, RTE_RELATION, RTE_RESULT, RTE_SUBQUERY, RTE_TABLEFUNC, RTE_VALUES, RangeTblEntry::rtekind, RangeTblEntry::subquery, RangeTblEntry::tablesample, TableSampleClause::tsmhandler, and RangeTblEntry::values_lists.
Referenced by set_append_rel_size(), and set_base_rel_sizes().
|
static |
Definition at line 473 of file allpaths.c.
References PlannerInfo::all_baserels, bms_membership(), BMS_SINGLETON, elog, ERROR, generate_useful_gather_paths(), RangeTblEntry::inh, IS_DUMMY_REL, RangeTblEntry::relkind, RELOPT_BASEREL, RelOptInfo::reloptkind, RTE_CTE, RTE_FUNCTION, RTE_NAMEDTUPLESTORE, RTE_RELATION, RTE_RESULT, RTE_SUBQUERY, RTE_TABLEFUNC, RTE_VALUES, RelOptInfo::rtekind, set_append_rel_pathlist(), set_cheapest(), set_foreign_pathlist(), set_function_pathlist(), set_plain_rel_pathlist(), set_rel_pathlist_hook, set_tablefunc_pathlist(), set_tablesample_rel_pathlist(), set_values_pathlist(), and RangeTblEntry::tablesample.
Referenced by set_append_rel_pathlist(), and set_base_rel_pathlists().
|
static |
Definition at line 364 of file allpaths.c.
References Assert(), elog, ERROR, RangeTblEntry::inh, IS_DUMMY_REL, relation_excluded_by_constraints(), RangeTblEntry::relkind, RELOPT_BASEREL, RelOptInfo::reloptkind, RelOptInfo::rows, RTE_CTE, RTE_FUNCTION, RTE_NAMEDTUPLESTORE, RTE_RELATION, RTE_RESULT, RTE_SUBQUERY, RTE_TABLEFUNC, RTE_VALUES, RelOptInfo::rtekind, RangeTblEntry::self_reference, set_append_rel_size(), set_cte_pathlist(), set_dummy_rel_pathlist(), set_foreign_size(), set_function_size_estimates(), set_namedtuplestore_pathlist(), set_plain_rel_size(), set_result_pathlist(), set_subquery_pathlist(), set_tablefunc_size_estimates(), set_tablesample_rel_size(), set_values_size_estimates(), set_worktable_pathlist(), and RangeTblEntry::tablesample.
Referenced by set_append_rel_size(), and set_base_rel_sizes().
|
static |
Definition at line 2880 of file allpaths.c.
References add_path(), create_resultscan_path(), RelOptInfo::lateral_relids, set_cheapest(), and set_result_size_estimates().
Referenced by set_rel_size().
|
static |
Definition at line 2450 of file allpaths.c.
References add_partial_path(), add_path(), Assert(), RelOptInfo::baserestrictinfo, bms_is_empty(), check_and_push_window_quals(), RestrictInfo::clause, RelOptInfo::consider_parallel, convert_subquery_pathkeys(), copyObject, create_subqueryscan_path(), fetch_upper_rel(), PlannerInfo::glob, has_multiple_baserels(), Query::hasWindowFuncs, if(), IS_DUMMY_REL, lappend(), RelOptInfo::lateral_relids, lfirst, list_length(), make_tlist_from_pathtarget(), NIL, palloc0(), parse(), PlannerInfo::parse, RelOptInfo::partial_pathlist, RelOptInfo::pathlist, pfree(), PlannerInfo::plan_params, RestrictInfo::pseudoconstant, qual_is_pushdown_safe(), remove_unused_subquery_outputs(), RangeTblEntry::security_barrier, set_dummy_rel_pathlist(), set_subquery_size_estimates(), subpath(), RelOptInfo::subplan_params, RangeTblEntry::subquery, subquery_is_pushdown_safe(), subquery_planner(), subquery_push_qual(), RelOptInfo::subroot, Query::targetList, PlannerInfo::tuple_fraction, pushdown_safety_info::unsafeColumns, pushdown_safety_info::unsafeLeaky, and UPPERREL_FINAL.
Referenced by set_rel_size().
|
static |
Definition at line 2759 of file allpaths.c.
References add_path(), create_tablefuncscan_path(), and RelOptInfo::lateral_relids.
Referenced by set_rel_pathlist().
|
static |
Definition at line 859 of file allpaths.c.
References add_path(), PlannerInfo::all_baserels, bms_membership(), BMS_SINGLETON, create_material_path(), create_samplescan_path(), GetTsmRoutine(), RelOptInfo::lateral_relids, PlannerInfo::query_level, TsmRoutine::repeatable_across_scans, RangeTblEntry::tablesample, and TableSampleClause::tsmhandler.
Referenced by set_rel_pathlist().
|
static |
Definition at line 819 of file allpaths.c.
References TableSampleClause::args, check_index_predicates(), GetTsmRoutine(), RelOptInfo::pages, TsmRoutine::SampleScanGetSampleSize, set_baserel_size_estimates(), RangeTblEntry::tablesample, TableSampleClause::tsmhandler, and RelOptInfo::tuples.
Referenced by set_rel_size().
|
static |
Definition at line 2739 of file allpaths.c.
References add_path(), create_valuesscan_path(), and RelOptInfo::lateral_relids.
Referenced by set_rel_pathlist().
|
static |
Definition at line 2910 of file allpaths.c.
References add_path(), create_worktablescan_path(), RangeTblEntry::ctelevelsup, RangeTblEntry::ctename, elog, ERROR, RelOptInfo::lateral_relids, PlannerInfo::non_recursive_path, PlannerInfo::parent_root, Path::rows, and set_cte_size_estimates().
Referenced by set_rel_size().
RelOptInfo* standard_join_search | ( | PlannerInfo * | root, |
int | levels_needed, | ||
List * | initial_rels | ||
) |
Definition at line 3346 of file allpaths.c.
References Assert(), elog, ERROR, generate_partitionwise_join_paths(), generate_useful_gather_paths(), PlannerInfo::join_rel_level, join_search_one_level(), lfirst, linitial, list_length(), NIL, palloc0(), and set_cheapest().
Referenced by make_rel_from_joinlist().
|
static |
Definition at line 3516 of file allpaths.c.
References Assert(), castNode, check_output_expressions(), SetOperationStmt::colTypes, compare_tlist_datatypes(), Query::distinctClause, Query::groupClause, Query::groupingSets, Query::hasTargetSRFs, Query::hasWindowFuncs, Query::limitCount, Query::limitOffset, recurse_pushdown_safe(), Query::setOperations, Query::targetList, and pushdown_safety_info::unsafeVolatile.
Referenced by recurse_pushdown_safe(), and set_subquery_pathlist().
|
static |
Definition at line 3875 of file allpaths.c.
References Query::groupClause, Query::groupingSets, Query::hasAggs, Query::hasSubLinks, Query::havingQual, Query::jointree, make_and_qual(), FromExpr::quals, recurse_push_qual(), REPLACEVARS_REPORT_ERROR, ReplaceVarsFromTargetList(), Query::setOperations, and Query::targetList.
Referenced by recurse_push_qual(), and set_subquery_pathlist().
|
static |
Definition at line 3740 of file allpaths.c.
References InvalidOid, lfirst, WindowClause::partitionClause, targetIsInSortList(), and Query::windowClause.
Referenced by check_output_expressions().
Definition at line 63 of file allpaths.c.
Referenced by make_rel_from_joinlist().
int geqo_threshold |
Definition at line 64 of file allpaths.c.
Referenced by make_rel_from_joinlist().
join_search_hook_type join_search_hook = NULL |
Definition at line 72 of file allpaths.c.
Referenced by make_rel_from_joinlist().
int min_parallel_index_scan_size |
Definition at line 66 of file allpaths.c.
Referenced by compute_parallel_worker(), and parallel_vacuum_compute_workers().
int min_parallel_table_scan_size |
Definition at line 65 of file allpaths.c.
Referenced by compute_parallel_worker().
set_rel_pathlist_hook_type set_rel_pathlist_hook = NULL |
Definition at line 69 of file allpaths.c.
Referenced by set_rel_pathlist().