|
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/prep.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"#include "utils/selfuncs.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 } |
| #define UNSAFE_HAS_SET_FUNC (1 << 1) |
Definition at line 56 of file allpaths.c.
| #define UNSAFE_HAS_VOLATILE_FUNC (1 << 0) |
Definition at line 55 of file allpaths.c.
| #define UNSAFE_NOTIN_DISTINCTON_CLAUSE (1 << 2) |
Definition at line 57 of file allpaths.c.
| #define UNSAFE_NOTIN_PARTITIONBY_CLAUSE (1 << 3) |
Definition at line 58 of file allpaths.c.
| #define UNSAFE_TYPE_MISMATCH (1 << 4) |
Definition at line 59 of file allpaths.c.
| Enumerator | |
|---|---|
| PUSHDOWN_UNSAFE | |
| PUSHDOWN_SAFE | |
| PUSHDOWN_WINDOWCLAUSE_RUNCOND | |
Definition at line 72 of file allpaths.c.
|
static |
Definition at line 2226 of file allpaths.c.
References fb(), IsA, lappend(), list_concat(), list_copy_head(), and list_copy_tail().
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 1404 of file allpaths.c.
References accumulate_append_subpath(), add_partial_path(), add_path(), Assert, bms_equal(), compare_pathkeys(), RelOptInfo::consider_parallel, RelOptInfo::consider_startup, create_append_path(), enable_parallel_append, fb(), for_each_from, generate_orderedappend_paths(), get_cheapest_fractional_path(), 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_REQ_OUTER, Path::pathkeys, PATHKEYS_EQUAL, pg_leftmost_one_pos32(), root, and subpath().
Referenced by apply_scanjoin_target_to_paths(), create_partitionwise_grouping_paths(), generate_partitionwise_join_paths(), and set_append_rel_pathlist().
|
static |
Definition at line 2543 of file allpaths.c.
References OpExpr::args, fb(), find_window_run_conditions(), func_strict(), IsA, linitial, list_length(), list_nth(), lsecond, set_opfuncid(), and Query::targetList.
Referenced by set_subquery_pathlist().
|
static |
Definition at line 4205 of file allpaths.c.
References contain_volatile_functions(), Query::distinctClause, expression_returns_set(), fb(), flatten_group_exprs(), InvalidOid, lfirst, targetIsInAllPartitionLists(), targetIsInSortList(), Query::targetList, UNSAFE_HAS_SET_FUNC, UNSAFE_HAS_VOLATILE_FUNC, UNSAFE_NOTIN_DISTINCTON_CLAUSE, and UNSAFE_NOTIN_PARTITIONBY_CLAUSE.
Referenced by subquery_is_pushdown_safe().
|
static |
Definition at line 4301 of file allpaths.c.
References elog, ERROR, exprType(), fb(), lfirst, lfirst_oid, list_head(), lnext(), and UNSAFE_TYPE_MISMATCH.
Referenced by subquery_is_pushdown_safe().
| int compute_parallel_worker | ( | RelOptInfo * | rel, |
| double | heap_pages, | ||
| double | index_pages, | ||
| int | max_workers | ||
| ) |
Definition at line 4726 of file allpaths.c.
References fb(), 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(), create_tidscan_paths(), and plan_create_index_workers().
| void create_partial_bitmap_paths | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| Path * | bitmapqual | ||
| ) |
Definition at line 4690 of file allpaths.c.
References add_partial_path(), compute_bitmap_pages(), compute_parallel_worker(), create_bitmap_heap_path(), fb(), RelOptInfo::lateral_relids, max_parallel_workers_per_gather, and root.
Referenced by create_index_paths().
|
static |
Definition at line 860 of file allpaths.c.
References add_partial_path(), compute_parallel_worker(), create_seqscan_path(), fb(), max_parallel_workers_per_gather, RelOptInfo::pages, and root.
Referenced by set_plain_rel_pathlist().
|
static |
Definition at line 2353 of file allpaths.c.
References arg, OpExpr::args, bms_add_member(), OpIndexInterpretation::cmptype, COMPARE_EQ, COMPARE_GE, COMPARE_GT, COMPARE_LE, COMPARE_LT, contain_subplans(), copyObject, DatumGetPointer(), fb(), FirstLowInvalidHeapAttributeNumber, get_func_support(), get_op_index_interpretation(), get_opfamily_member_for_cmptype(), InvalidOid, is_pseudo_constant_clause(), IsA, lappend(), lfirst, linitial, list_nth(), lsecond, makeNode, SupportRequestWFuncMonotonic::monotonic, MONOTONICFUNC_BOTH, MONOTONICFUNC_DECREASING, MONOTONICFUNC_INCREASING, MONOTONICFUNC_NONE, OidFunctionCall1, OidIsValid, OpExpr::opno, PointerGetDatum(), 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 3188 of file allpaths.c.
References add_path(), compute_gather_rows(), create_gather_merge_path(), create_gather_path(), fb(), lfirst, linitial, NIL, RelOptInfo::partial_pathlist, GatherMergePath::path, RelOptInfo::reltarget, root, and subpath().
Referenced by generate_useful_gather_paths().
| void generate_grouped_paths | ( | PlannerInfo * | root, |
| RelOptInfo * | grouped_rel, | ||
| RelOptInfo * | rel | ||
| ) |
Definition at line 3442 of file allpaths.c.
References add_partial_path(), add_path(), AGG_HASHED, RelOptInfo::agg_info, RelAggInfo::agg_input, AGG_SORTED, RelAggInfo::agg_useful, AGGSPLIT_INITIAL_SERIAL, RelAggInfo::apply_agg_at, Assert, bms_equal(), RelOptInfo::cheapest_total_path, RelOptInfo::consider_parallel, create_agg_path(), create_incremental_sort_path(), create_projection_path(), create_sort_path(), enable_incremental_sort, estimate_num_groups(), fb(), get_agg_clause_costs(), RelAggInfo::group_clauses, RelAggInfo::group_exprs, RelOptInfo::grouped_rel, grouping_is_hashable(), grouping_is_sortable(), IS_DUMMY_REL, IS_OTHER_REL, lfirst, linitial, make_pathkeys_for_sortclauses(), make_tlist_from_pathtarget(), mark_dummy_rel(), MemSet, NIL, RelOptInfo::partial_pathlist, pathkeys_count_contained_in(), RelOptInfo::pathlist, RelOptInfo::relids, root, Path::rows, and RelAggInfo::target.
Referenced by generate_partitionwise_join_paths(), merge_clump(), set_grouped_rel_pathlist(), and standard_join_search().
|
static |
Definition at line 1832 of file allpaths.c.
References accumulate_append_subpath(), add_path(), Assert, BackwardScanDirection, build_partition_pathkeys(), create_append_path(), create_merge_append_path(), fb(), 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(), 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 4814 of file allpaths.c.
References add_paths_to_append_rel(), Assert, bms_equal(), check_stack_depth(), RelOptInfo::consider_partitionwise_join, fb(), generate_grouped_paths(), generate_partitionwise_join_paths(), RelOptInfo::grouped_rel, IS_DUMMY_REL, IS_GROUPED_REL, IS_JOIN_REL, IS_OTHER_REL, IS_PARTITIONED_REL, lappend(), list_free(), mark_dummy_rel(), NIL, RelOptInfo::nparts, pprint(), RelOptInfo::relids, root, set_cheapest(), and RelOptInfo::top_parent_relids.
Referenced by generate_partitionwise_join_paths(), merge_clump(), and standard_join_search().
| void generate_useful_gather_paths | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| bool | override_rows | ||
| ) |
Definition at line 3325 of file allpaths.c.
References add_path(), compute_gather_rows(), create_gather_merge_path(), create_incremental_sort_path(), create_sort_path(), enable_incremental_sort, fb(), 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(), create_partial_unique_paths(), gather_grouping_paths(), merge_clump(), set_rel_pathlist(), and standard_join_search().
|
static |
Definition at line 2138 of file allpaths.c.
References Assert, bms_equal(), bms_is_subset(), compare_path_costs(), fb(), 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 2271 of file allpaths.c.
References Assert, fb(), IsA, linitial, list_length(), and Path::parallel_aware.
Referenced by generate_orderedappend_paths().
|
static |
Definition at line 3257 of file allpaths.c.
References fb(), 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 177 of file allpaths.c.
References Assert, bms_equal(), fb(), IS_DUMMY_REL, IS_SIMPLE_REL, make_rel_from_joinlist(), RelOptInfo::relids, root, set_base_rel_consider_startup(), set_base_rel_pathlists(), set_base_rel_sizes(), and setup_simple_grouped_rels().
Referenced by query_planner().
|
static |
Definition at line 3780 of file allpaths.c.
References elog, enable_geqo, ERROR, fb(), find_base_rel(), geqo(), geqo_threshold, IsA, join_search_hook, lappend(), lfirst, linitial, list_length(), make_rel_from_joinlist(), NIL, nodeTag, root, and standard_join_search().
Referenced by make_one_rel(), and make_rel_from_joinlist().
|
static |
Definition at line 4377 of file allpaths.c.
References Assert, RestrictInfo::clause, contain_leaked_vars(), contain_subplans(), contain_volatile_functions(), fb(), 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, Var::varattno, and Var::varno.
Referenced by set_subquery_pathlist().
|
static |
Definition at line 4526 of file allpaths.c.
References Assert, elog, ERROR, fb(), IsA, SetOperationStmt::larg, nodeTag, SetOperationStmt::rarg, recurse_push_qual(), rt_fetch, and subquery_push_qual().
Referenced by recurse_push_qual(), and subquery_push_qual().
|
static |
Definition at line 4136 of file allpaths.c.
References Assert, elog, ERROR, fb(), IsA, SetOperationStmt::larg, nodeTag, SetOperationStmt::op, SetOperationStmt::rarg, recurse_pushdown_safe(), rt_fetch, SETOP_EXCEPT, and subquery_is_pushdown_safe().
Referenced by recurse_pushdown_safe(), and subquery_is_pushdown_safe().
|
static |
Definition at line 4578 of file allpaths.c.
References RelOptInfo::baserestrictinfo, bms_is_member(), RestrictInfo::clause, contain_volatile_functions(), Query::distinctClause, exprCollation(), expression_returns_set(), PathTarget::exprs, exprType(), exprTypmod(), fb(), FirstLowInvalidHeapAttributeNumber, lfirst, makeNullConst(), pull_varattnos(), RelOptInfo::relid, RelOptInfo::reltarget, Query::setOperations, and Query::targetList.
Referenced by set_subquery_pathlist().
|
static |
Definition at line 1305 of file allpaths.c.
References add_paths_to_append_rel(), RelOptInfo::consider_parallel, fb(), IS_DUMMY_REL, lappend(), lfirst, NIL, root, and set_rel_pathlist().
Referenced by set_rel_pathlist().
|
static |
Definition at line 1010 of file allpaths.c.
References add_child_rel_equivalences(), adjust_appendrel_attrs(), Assert, bms_is_empty, bms_overlap(), check_stack_depth(), RelOptInfo::consider_parallel, RelOptInfo::consider_partitionwise_join, enable_partitionwise_join, PathTarget::exprs, exprType(), exprTypmod(), fb(), 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(), pfree(), relation_excluded_by_constraints(), 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, and PathTarget::width.
Referenced by set_rel_size().
|
static |
Definition at line 259 of file allpaths.c.
References bms_get_singleton_member(), RelOptInfo::consider_param_startup, fb(), find_base_rel(), JOIN_ANTI, JOIN_SEMI, SpecialJoinInfo::jointype, lfirst, root, and SpecialJoinInfo::syn_righthand.
Referenced by make_one_rel().
|
static |
Definition at line 378 of file allpaths.c.
References Assert, fb(), RelOptInfo::relid, RELOPT_BASEREL, RelOptInfo::reloptkind, root, and set_rel_pathlist().
Referenced by make_one_rel().
|
static |
Definition at line 302 of file allpaths.c.
References Assert, fb(), RelOptInfo::relid, RELOPT_BASEREL, RelOptInfo::reloptkind, root, set_rel_consider_parallel(), and set_rel_size().
Referenced by make_one_rel().
|
static |
Definition at line 2996 of file allpaths.c.
References add_path(), Assert, convert_subquery_pathkeys(), create_ctescan_path(), CommonTableExpr::ctename, elog, ERROR, fb(), RelOptInfo::lateral_relids, lfirst, list_length(), list_nth(), list_nth_int(), root, and set_cte_size_estimates().
Referenced by set_rel_size().
|
static |
Definition at line 2305 of file allpaths.c.
References add_path(), create_append_path(), fb(), 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 992 of file allpaths.c.
References fb(), RelOptInfo::relid, and root.
Referenced by set_rel_pathlist().
|
static |
Definition at line 968 of file allpaths.c.
References clamp_row_est(), fb(), Max, RelOptInfo::relid, root, RelOptInfo::rows, set_foreign_size_estimates(), and RelOptInfo::tuples.
Referenced by set_rel_size().
|
static |
Definition at line 2885 of file allpaths.c.
References add_path(), build_expression_pathkey(), create_functionscan_path(), PathTarget::exprs, fb(), 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 1368 of file allpaths.c.
References Assert, generate_grouped_paths(), RelOptInfo::grouped_rel, IS_GROUPED_REL, NIL, root, and set_cheapest().
Referenced by set_rel_pathlist().
|
static |
Definition at line 3075 of file allpaths.c.
References add_path(), create_namedtuplestorescan_path(), fb(), RelOptInfo::lateral_relids, root, and set_namedtuplestore_size_estimates().
Referenced by set_rel_size().
|
static |
Definition at line 822 of file allpaths.c.
References add_path(), RelOptInfo::consider_parallel, create_index_paths(), create_plain_partial_paths(), create_seqscan_path(), create_tidscan_paths(), fb(), RelOptInfo::lateral_relids, and root.
Referenced by set_rel_pathlist().
|
static |
Definition at line 626 of file allpaths.c.
References check_index_predicates(), root, and set_baserel_size_estimates().
Referenced by set_rel_size().
|
static |
Definition at line 643 of file allpaths.c.
References Assert, RelOptInfo::baserestrictinfo, castNode, RelOptInfo::consider_parallel, PathTarget::exprs, fb(), func_parallel(), get_rel_persistence(), is_parallel_safe(), IS_SIMPLE_REL, limit_needed(), RelOptInfo::reltarget, root, RTE_CTE, RTE_FUNCTION, RTE_GROUP, RTE_JOIN, RTE_NAMEDTUPLESTORE, RTE_RELATION, RTE_RESULT, RTE_SUBQUERY, RTE_TABLEFUNC, and RTE_VALUES.
Referenced by set_append_rel_size(), and set_base_rel_sizes().
|
static |
Definition at line 514 of file allpaths.c.
References bms_equal(), elog, ERROR, fb(), generate_useful_gather_paths(), 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_grouped_rel_pathlist(), set_plain_rel_pathlist(), set_rel_pathlist_hook, set_tablefunc_pathlist(), set_tablesample_rel_pathlist(), and set_values_pathlist().
Referenced by set_append_rel_pathlist(), and set_base_rel_pathlists().
|
static |
Definition at line 405 of file allpaths.c.
References Assert, elog, ERROR, fb(), 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(), and set_worktable_pathlist().
Referenced by set_append_rel_size(), and set_base_rel_sizes().
|
static |
Definition at line 3102 of file allpaths.c.
References add_path(), create_resultscan_path(), fb(), RelOptInfo::lateral_relids, root, and set_result_size_estimates().
Referenced by set_rel_size().
|
static |
Definition at line 2616 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(), choose_plan_name(), RestrictInfo::clause, RelOptInfo::consider_parallel, convert_subquery_pathkeys(), copyObject, create_subqueryscan_path(), PathTarget::exprs, fb(), fetch_upper_rel(), foreach_current_index, IS_DUMMY_REL, IsA, lappend(), RelOptInfo::lateral_relids, lfirst, list_length(), make_tlist_from_pathtarget(), NIL, palloc0(), parse(), 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, subquery_is_pushdown_safe(), subquery_planner(), subquery_push_qual(), RelOptInfo::subroot, Query::targetList, UPPERREL_FINAL, Var::varattno, and Var::varno.
Referenced by set_rel_size().
|
static |
Definition at line 2972 of file allpaths.c.
References add_path(), create_tablefuncscan_path(), fb(), RelOptInfo::lateral_relids, and root.
Referenced by set_rel_pathlist().
|
static |
Definition at line 920 of file allpaths.c.
References add_path(), bms_membership(), BMS_SINGLETON, create_material_path(), create_samplescan_path(), fb(), GetTsmRoutine(), RelOptInfo::lateral_relids, TsmRoutine::repeatable_across_scans, and root.
Referenced by set_rel_pathlist().
|
static |
Definition at line 880 of file allpaths.c.
References check_index_predicates(), fb(), GetTsmRoutine(), RelOptInfo::pages, root, set_baserel_size_estimates(), and RelOptInfo::tuples.
Referenced by set_rel_size().
|
static |
Definition at line 2952 of file allpaths.c.
References add_path(), create_valuesscan_path(), fb(), RelOptInfo::lateral_relids, and root.
Referenced by set_rel_pathlist().
|
static |
Definition at line 3129 of file allpaths.c.
References add_path(), create_worktablescan_path(), elog, ERROR, fb(), RelOptInfo::lateral_relids, root, RelOptInfo::rows, and set_cte_size_estimates().
Referenced by set_rel_size().
|
static |
Definition at line 344 of file allpaths.c.
References Assert, build_simple_grouped_rel(), fb(), IS_SIMPLE_REL, NIL, RelOptInfo::relid, and root.
Referenced by make_one_rel().
| RelOptInfo * standard_join_search | ( | PlannerInfo * | root, |
| int | levels_needed, | ||
| List * | initial_rels | ||
| ) |
Definition at line 3885 of file allpaths.c.
References Assert, bms_equal(), elog, ERROR, fb(), generate_grouped_paths(), generate_partitionwise_join_paths(), generate_useful_gather_paths(), RelOptInfo::grouped_rel, IS_GROUPED_REL, 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 4080 of file allpaths.c.
References Assert, castNode, check_output_expressions(), compare_tlist_datatypes(), Query::distinctClause, fb(), Query::groupClause, Query::groupingSets, Query::limitCount, Query::limitOffset, recurse_pushdown_safe(), Query::setOperations, and Query::targetList.
Referenced by recurse_pushdown_safe(), and set_subquery_pathlist().
|
static |
Definition at line 4478 of file allpaths.c.
References fb(), 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 4334 of file allpaths.c.
References fb(), InvalidOid, lfirst, WindowClause::partitionClause, targetIsInSortList(), and Query::windowClause.
Referenced by check_output_expressions().
Definition at line 82 of file allpaths.c.
Referenced by setup_eager_aggregation().
Definition at line 81 of file allpaths.c.
Referenced by make_rel_from_joinlist().
| int geqo_threshold |
Definition at line 83 of file allpaths.c.
Referenced by make_rel_from_joinlist().
| join_search_hook_type join_search_hook = NULL |
Definition at line 92 of file allpaths.c.
Referenced by make_rel_from_joinlist().
| double min_eager_agg_group_size |
Definition at line 84 of file allpaths.c.
Referenced by create_rel_agg_info().
| int min_parallel_index_scan_size |
Definition at line 86 of file allpaths.c.
Referenced by compute_parallel_worker(), and parallel_vacuum_compute_workers().
| int min_parallel_table_scan_size |
Definition at line 85 of file allpaths.c.
Referenced by compute_parallel_worker().
| set_rel_pathlist_hook_type set_rel_pathlist_hook = NULL |
Definition at line 89 of file allpaths.c.
Referenced by set_rel_pathlist().