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/optimizer.h"
#include "optimizer/pathnode.h"
#include "optimizer/paths.h"
#include "optimizer/plancat.h"
#include "optimizer/planner.h"
#include "optimizer/tlist.h"
#include "parser/parse_clause.h"
#include "parser/parsetree.h"
#include "partitioning/partbounds.h"
#include "port/pg_bitutils.h"
#include "rewrite/rewriteManip.h"
#include "utils/lsyscache.h"
Go to the source code of this file.
Data Structures | |
struct | pushdown_safety_info |
Macros | |
#define | UNSAFE_HAS_VOLATILE_FUNC (1 << 0) |
#define | UNSAFE_HAS_SET_FUNC (1 << 1) |
#define | UNSAFE_NOTIN_DISTINCTON_CLAUSE (1 << 2) |
#define | UNSAFE_NOTIN_PARTITIONBY_CLAUSE (1 << 3) |
#define | UNSAFE_TYPE_MISMATCH (1 << 4) |
Typedefs | |
typedef struct pushdown_safety_info | pushdown_safety_info |
typedef enum pushdown_safe_type | pushdown_safe_type |
Enumerations | |
enum | pushdown_safe_type { PUSHDOWN_UNSAFE , PUSHDOWN_SAFE , PUSHDOWN_WINDOWCLAUSE_RUNCOND } |
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 |
#define UNSAFE_HAS_SET_FUNC (1 << 1) |
Definition at line 54 of file allpaths.c.
#define UNSAFE_HAS_VOLATILE_FUNC (1 << 0) |
Definition at line 53 of file allpaths.c.
#define UNSAFE_NOTIN_DISTINCTON_CLAUSE (1 << 2) |
Definition at line 55 of file allpaths.c.
#define UNSAFE_NOTIN_PARTITIONBY_CLAUSE (1 << 3) |
Definition at line 56 of file allpaths.c.
#define UNSAFE_TYPE_MISMATCH (1 << 4) |
Definition at line 57 of file allpaths.c.
typedef enum pushdown_safe_type pushdown_safe_type |
typedef struct pushdown_safety_info pushdown_safety_info |
enum pushdown_safe_type |
Enumerator | |
---|---|
PUSHDOWN_UNSAFE | |
PUSHDOWN_SAFE | |
PUSHDOWN_WINDOWCLAUSE_RUNCOND |
Definition at line 70 of file allpaths.c.
|
static |
Definition at line 2099 of file allpaths.c.
References AppendPath::first_partial_path, IsA, lappend(), list_concat(), list_copy_head(), list_copy_tail(), 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 1314 of file allpaths.c.
References accumulate_append_subpath(), add_partial_path(), add_path(), Assert, bms_equal(), RelOptInfo::cheapest_startup_path, RelOptInfo::cheapest_total_path, compare_pathkeys(), RelOptInfo::consider_parallel, RelOptInfo::consider_startup, create_append_path(), enable_parallel_append, 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, RelOptInfo::partial_pathlist, AppendPath::path, PATH_REQ_OUTER, Path::pathkeys, PATHKEYS_EQUAL, RelOptInfo::pathlist, pg_leftmost_one_pos32(), root, 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 2419 of file allpaths.c.
References OpExpr::args, TargetEntry::expr, find_window_run_conditions(), func_strict(), if(), IsA, linitial, list_length(), list_nth(), lsecond, TargetEntry::resno, set_opfuncid(), Query::targetList, and Var::varattno.
Referenced by set_subquery_pathlist().
|
static |
Definition at line 3718 of file allpaths.c.
References contain_volatile_functions(), Query::distinctClause, TargetEntry::expr, expression_returns_set(), InvalidOid, lfirst, TargetEntry::resno, targetIsInAllPartitionLists(), targetIsInSortList(), Query::targetList, UNSAFE_HAS_SET_FUNC, UNSAFE_HAS_VOLATILE_FUNC, UNSAFE_NOTIN_DISTINCTON_CLAUSE, UNSAFE_NOTIN_PARTITIONBY_CLAUSE, and pushdown_safety_info::unsafeFlags.
Referenced by subquery_is_pushdown_safe().
|
static |
Definition at line 3790 of file allpaths.c.
References elog, ERROR, TargetEntry::expr, exprType(), lfirst, lfirst_oid, list_head(), lnext(), TargetEntry::resno, UNSAFE_TYPE_MISMATCH, and pushdown_safety_info::unsafeFlags.
Referenced by subquery_is_pushdown_safe().
int compute_parallel_worker | ( | RelOptInfo * | rel, |
double | heap_pages, | ||
double | index_pages, | ||
int | max_workers | ||
) |
Definition at line 4214 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 4178 of file allpaths.c.
References add_partial_path(), compute_bitmap_pages(), compute_parallel_worker(), create_bitmap_heap_path(), RelOptInfo::lateral_relids, max_parallel_workers_per_gather, and root.
Referenced by create_index_paths().
|
static |
Definition at line 806 of file allpaths.c.
References add_partial_path(), compute_parallel_worker(), create_seqscan_path(), max_parallel_workers_per_gather, RelOptInfo::pages, and root.
Referenced by set_plain_rel_pathlist().
|
static |
Definition at line 2226 of file allpaths.c.
References arg, WindowFuncRunCondition::arg, OpExpr::args, bms_add_member(), BTEqualStrategyNumber, BTGreaterEqualStrategyNumber, BTGreaterStrategyNumber, BTLessEqualStrategyNumber, BTLessStrategyNumber, contain_subplans(), copyObject, DatumGetPointer(), FirstLowInvalidHeapAttributeNumber, get_func_support(), get_op_btree_interpretation(), get_opfamily_member(), InvalidOid, is_pseudo_constant_clause(), IsA, lappend(), lfirst, linitial, list_nth(), lsecond, makeNode, MONOTONICFUNC_BOTH, MONOTONICFUNC_DECREASING, MONOTONICFUNC_INCREASING, MONOTONICFUNC_NONE, OidFunctionCall1, OidIsValid, OpBtreeInterpretation::opfamily_id, OpBtreeInterpretation::oplefttype, WindowFuncRunCondition::opno, OpExpr::opno, OpBtreeInterpretation::oprighttype, PointerGetDatum(), res, OpBtreeInterpretation::strategy, SupportRequestWFuncMonotonic::type, WindowFuncRunCondition::wfunc_left, 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 3064 of file allpaths.c.
References add_path(), compute_gather_rows(), create_gather_merge_path(), create_gather_path(), lfirst, linitial, NIL, RelOptInfo::partial_pathlist, GatherMergePath::path, RelOptInfo::reltarget, root, and subpath().
Referenced by generate_useful_gather_paths().
|
static |
Definition at line 1726 of file allpaths.c.
References accumulate_append_subpath(), add_path(), Assert, BackwardScanDirection, 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(), i, IS_SIMPLE_REL, lappend(), lfirst, list_length(), list_nth_node, RelOptInfo::live_parts, NIL, partitions_are_ordered(), pathkeys_contained_in(), RelOptInfo::pathlist, root, STARTUP_COST, and TOTAL_COST.
Referenced by add_paths_to_append_rel().
void generate_partitionwise_join_paths | ( | PlannerInfo * | root, |
RelOptInfo * | rel | ||
) |
Definition at line 4302 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::pathlist, pprint(), root, 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 3201 of file allpaths.c.
References add_path(), compute_gather_rows(), create_gather_merge_path(), create_incremental_sort_path(), create_sort_path(), enable_incremental_sort, generate_gather_paths(), get_useful_pathkeys_for_relation(), lfirst, linitial, NIL, RelOptInfo::partial_pathlist, GatherMergePath::path, pathkeys_count_contained_in(), RelOptInfo::reltarget, root, and subpath().
Referenced by apply_scanjoin_target_to_paths(), create_partial_distinct_paths(), gather_grouping_paths(), merge_clump(), set_rel_pathlist(), and standard_join_search().
|
static |
Definition at line 2011 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(), root, and TOTAL_COST.
Referenced by add_paths_to_append_rel().
Definition at line 2144 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 3133 of file allpaths.c.
References lappend(), lfirst, list_copy_head(), list_length(), NIL, relation_can_be_sorted_early(), and root.
Referenced by generate_useful_gather_paths().
RelOptInfo* make_one_rel | ( | PlannerInfo * | root, |
List * | joinlist | ||
) |
Definition at line 171 of file allpaths.c.
References Assert, bms_equal(), IS_DUMMY_REL, IS_SIMPLE_REL, make_rel_from_joinlist(), RelOptInfo::pages, RelOptInfo::relid, RelOptInfo::relids, root, set_base_rel_consider_startup(), set_base_rel_pathlists(), and set_base_rel_sizes().
Referenced by query_planner().
|
static |
Definition at line 3317 of file allpaths.c.
References elog, enable_geqo, ERROR, find_base_rel(), geqo(), geqo_threshold, IsA, join_search_hook, lappend(), lfirst, linitial, list_length(), NIL, nodeTag, root, and standard_join_search().
Referenced by make_one_rel().
|
static |
Definition at line 3866 of file allpaths.c.
References Assert, RestrictInfo::clause, contain_leaked_vars(), contain_subplans(), contain_volatile_functions(), if(), IsA, lfirst, list_free(), pull_var_clause(), PUSHDOWN_SAFE, PUSHDOWN_UNSAFE, PUSHDOWN_WINDOWCLAUSE_RUNCOND, PVC_INCLUDE_PLACEHOLDERS, UNSAFE_HAS_SET_FUNC, UNSAFE_HAS_VOLATILE_FUNC, UNSAFE_NOTIN_DISTINCTON_CLAUSE, UNSAFE_TYPE_MISMATCH, pushdown_safety_info::unsafeFlags, pushdown_safety_info::unsafeLeaky, pushdown_safety_info::unsafeVolatile, Var::varattno, and Var::varno.
Referenced by set_subquery_pathlist().
|
static |
Definition at line 4014 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 3649 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 4066 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, if(), lfirst, makeNullConst(), pull_varattnos(), RelOptInfo::relid, RelOptInfo::reltarget, TargetEntry::resno, TargetEntry::ressortgroupref, Query::setOperations, and Query::targetList.
Referenced by set_subquery_pathlist().
|
static |
Definition at line 1244 of file allpaths.c.
References add_paths_to_append_rel(), AppendRelInfo::child_relid, RelOptInfo::consider_parallel, IS_DUMMY_REL, lappend(), lfirst, NIL, AppendRelInfo::parent_relid, root, and set_rel_pathlist().
Referenced by set_rel_pathlist().
|
static |
Definition at line 956 of file allpaths.c.
References add_child_rel_equivalences(), adjust_appendrel_attrs(), Assert, bms_is_empty, bms_overlap(), 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(), RelOptInfo::has_eclass_joins, has_useful_pathkeys(), i, InvalidAttrNumber, IS_DUMMY_REL, IS_SIMPLE_REL, IsA, RelOptInfo::joininfo, lappend(), lfirst, RelOptInfo::max_attr, RelOptInfo::min_attr, NIL, RelOptInfo::nulling_relids, palloc0(), AppendRelInfo::parent_relid, pfree(), relation_excluded_by_constraints(), RelOptInfo::relid, RELOPT_BASEREL, RELOPT_OTHER_MEMBER_REL, RelOptInfo::reloptkind, RelOptInfo::reltarget, root, RelOptInfo::rows, set_dummy_rel_pathlist(), set_rel_consider_parallel(), set_rel_size(), RelOptInfo::tuples, Var::varattno, Var::varno, and PathTarget::width.
Referenced by set_rel_size().
|
static |
Definition at line 247 of file allpaths.c.
References bms_get_singleton_member(), RelOptInfo::consider_param_startup, find_base_rel(), JOIN_ANTI, JOIN_SEMI, SpecialJoinInfo::jointype, lfirst, root, and SpecialJoinInfo::syn_righthand.
Referenced by make_one_rel().
|
static |
Definition at line 333 of file allpaths.c.
References Assert, RelOptInfo::relid, RELOPT_BASEREL, RelOptInfo::reloptkind, root, and set_rel_pathlist().
Referenced by make_one_rel().
|
static |
Definition at line 290 of file allpaths.c.
References Assert, RelOptInfo::relid, RELOPT_BASEREL, RelOptInfo::reloptkind, root, set_rel_consider_parallel(), and set_rel_size().
Referenced by make_one_rel().
|
static |
Definition at line 2872 of file allpaths.c.
References add_path(), Assert, convert_subquery_pathkeys(), create_ctescan_path(), PlannerInfo::cte_plan_ids, RangeTblEntry::ctelevelsup, Query::cteList, RangeTblEntry::ctename, CommonTableExpr::ctename, elog, ERROR, RelOptInfo::lateral_relids, lfirst, list_length(), list_nth(), list_nth_int(), PlannerInfo::parse, Path::pathkeys, Plan::plan_rows, root, set_cte_size_estimates(), and Plan::targetlist.
Referenced by set_rel_size().
|
static |
Definition at line 2178 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 938 of file allpaths.c.
References RangeTblEntry::relid, and root.
Referenced by set_rel_pathlist().
|
static |
Definition at line 914 of file allpaths.c.
References clamp_row_est(), Max, RangeTblEntry::relid, root, RelOptInfo::rows, set_foreign_size_estimates(), and RelOptInfo::tuples.
Referenced by set_rel_size().
|
static |
Definition at line 2761 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, root, Var::varattno, Var::varlevelsup, and Var::varno.
Referenced by set_rel_pathlist().
|
static |
Definition at line 2951 of file allpaths.c.
References add_path(), create_namedtuplestorescan_path(), RelOptInfo::lateral_relids, root, and set_namedtuplestore_size_estimates().
Referenced by set_rel_size().
|
static |
Definition at line 768 of file allpaths.c.
References add_path(), RelOptInfo::consider_parallel, create_index_paths(), create_plain_partial_paths(), create_seqscan_path(), create_tidscan_paths(), RelOptInfo::lateral_relids, and root.
Referenced by set_rel_pathlist().
|
static |
Definition at line 572 of file allpaths.c.
References check_index_predicates(), root, and set_baserel_size_estimates().
Referenced by set_rel_size().
|
static |
Definition at line 589 of file allpaths.c.
References TableSampleClause::args, Assert, RelOptInfo::baserestrictinfo, castNode, RelOptInfo::consider_parallel, PathTarget::exprs, func_parallel(), RangeTblEntry::functions, get_rel_persistence(), is_parallel_safe(), IS_SIMPLE_REL, limit_needed(), RangeTblEntry::relid, RelOptInfo::reltarget, root, RTE_CTE, RTE_FUNCTION, RTE_GROUP, 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 469 of file allpaths.c.
References bms_equal(), elog, ERROR, generate_useful_gather_paths(), RangeTblEntry::inh, IS_DUMMY_REL, pprint(), RelOptInfo::relids, RELOPT_BASEREL, RelOptInfo::reloptkind, root, 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 360 of file allpaths.c.
References Assert, elog, ERROR, RangeTblEntry::inh, IS_DUMMY_REL, relation_excluded_by_constraints(), RELOPT_BASEREL, RelOptInfo::reloptkind, root, RelOptInfo::rows, RTE_CTE, RTE_FUNCTION, RTE_NAMEDTUPLESTORE, RTE_RELATION, RTE_RESULT, RTE_SUBQUERY, RTE_TABLEFUNC, RTE_VALUES, RelOptInfo::rtekind, 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 2978 of file allpaths.c.
References add_path(), create_resultscan_path(), RelOptInfo::lateral_relids, root, and set_result_size_estimates().
Referenced by set_rel_size().
|
static |
Definition at line 2494 of file allpaths.c.
References add_partial_path(), add_path(), Assert, RelOptInfo::baserestrictinfo, bms_is_empty, bms_membership(), BMS_MULTIPLE, check_and_push_window_quals(), RestrictInfo::clause, RelOptInfo::consider_parallel, convert_subquery_pathkeys(), copyObject, create_subqueryscan_path(), PathTarget::exprs, fetch_upper_rel(), foreach_current_index, if(), IS_DUMMY_REL, IsA, lappend(), RelOptInfo::lateral_relids, lfirst, list_length(), make_tlist_from_pathtarget(), NIL, palloc0(), parse(), RelOptInfo::partial_pathlist, RelOptInfo::pathlist, pfree(), PUSHDOWN_SAFE, PUSHDOWN_UNSAFE, PUSHDOWN_WINDOWCLAUSE_RUNCOND, qual_is_pushdown_safe(), RelOptInfo::reltarget, remove_unused_subquery_outputs(), root, 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, pushdown_safety_info::unsafeFlags, pushdown_safety_info::unsafeLeaky, UPPERREL_FINAL, Var::varattno, and Var::varno.
Referenced by set_rel_size().
|
static |
Definition at line 2848 of file allpaths.c.
References add_path(), create_tablefuncscan_path(), RelOptInfo::lateral_relids, and root.
Referenced by set_rel_pathlist().
|
static |
Definition at line 866 of file allpaths.c.
References add_path(), bms_membership(), BMS_SINGLETON, create_material_path(), create_samplescan_path(), GetTsmRoutine(), RelOptInfo::lateral_relids, TsmRoutine::repeatable_across_scans, root, RangeTblEntry::tablesample, and TableSampleClause::tsmhandler.
Referenced by set_rel_pathlist().
|
static |
Definition at line 826 of file allpaths.c.
References TableSampleClause::args, check_index_predicates(), GetTsmRoutine(), RelOptInfo::pages, root, TsmRoutine::SampleScanGetSampleSize, set_baserel_size_estimates(), RangeTblEntry::tablesample, TableSampleClause::tsmhandler, and RelOptInfo::tuples.
Referenced by set_rel_size().
|
static |
Definition at line 2828 of file allpaths.c.
References add_path(), create_valuesscan_path(), RelOptInfo::lateral_relids, and root.
Referenced by set_rel_pathlist().
|
static |
Definition at line 3005 of file allpaths.c.
References add_path(), create_worktablescan_path(), RangeTblEntry::ctelevelsup, RangeTblEntry::ctename, elog, ERROR, RelOptInfo::lateral_relids, PlannerInfo::non_recursive_path, 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 3422 of file allpaths.c.
References Assert, bms_equal(), elog, ERROR, generate_partitionwise_join_paths(), generate_useful_gather_paths(), join_search_one_level(), lfirst, linitial, list_length(), NIL, palloc0(), pprint(), RelOptInfo::relids, root, and set_cheapest().
Referenced by make_rel_from_joinlist().
|
static |
Definition at line 3593 of file allpaths.c.
References Assert, castNode, check_output_expressions(), compare_tlist_datatypes(), Query::distinctClause, Query::groupClause, Query::groupingSets, 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 3967 of file allpaths.c.
References Query::groupClause, Query::groupingSets, 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 3823 of file allpaths.c.
References InvalidOid, lfirst, WindowClause::partitionClause, targetIsInSortList(), and Query::windowClause.
Referenced by check_output_expressions().
bool enable_geqo = false |
Definition at line 79 of file allpaths.c.
Referenced by make_rel_from_joinlist().
int geqo_threshold |
Definition at line 80 of file allpaths.c.
Referenced by make_rel_from_joinlist().
join_search_hook_type join_search_hook = NULL |
Definition at line 88 of file allpaths.c.
Referenced by make_rel_from_joinlist().
int min_parallel_index_scan_size |
Definition at line 82 of file allpaths.c.
Referenced by compute_parallel_worker(), and parallel_vacuum_compute_workers().
int min_parallel_table_scan_size |
Definition at line 81 of file allpaths.c.
Referenced by compute_parallel_worker().
set_rel_pathlist_hook_type set_rel_pathlist_hook = NULL |
Definition at line 85 of file allpaths.c.
Referenced by set_rel_pathlist().