|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "pgpa_join.h"#include "pgpa_scan.h"#include "pgpa_walker.h"#include "nodes/plannodes.h"#include "parser/parsetree.h"#include "utils/lsyscache.h"
Go to the source code of this file.
|
static |
Definition at line 606 of file pgpa_walker.c.
References fb(), lappend(), palloc0_object, plan, and type.
Referenced by pgpa_add_future_feature(), and pgpa_walk_recursively().
| void pgpa_add_future_feature | ( | pgpa_plan_walker_context * | walker, |
| pgpa_qf_type | type, | ||
| Plan * | plan | ||
| ) |
Definition at line 502 of file pgpa_walker.c.
References fb(), lappend(), pgpa_add_feature(), plan, and type.
Referenced by pgpa_decompose_join().
Definition at line 585 of file pgpa_walker.c.
References bms_add_member(), bms_next_member(), fb(), rt_fetch, and RTE_JOIN.
Referenced by pgpa_build_scan(), pgpa_qf_add_plan_rtis(), and pgpa_walk_recursively().
| ElidedNode * pgpa_last_elided_node | ( | PlannedStmt * | pstmt, |
| Plan * | plan | ||
| ) |
Definition at line 518 of file pgpa_walker.c.
References PlannedStmt::elidedNodes, fb(), foreach_node, and plan.
Referenced by pgpa_decompose_join(), and pgpa_descend_node().
| void pgpa_plan_walker | ( | pgpa_plan_walker_context * | walker, |
| PlannedStmt * | pstmt, | ||
| List * | sj_unique_rels | ||
| ) |
Definition at line 71 of file pgpa_walker.c.
References Assert, bms_add_member(), bms_next_member(), buf, elog, ERROR, fb(), foreach_node, foreach_ptr, initStringInfo(), lappend(), lfirst, list_member(), NIL, NUM_PGPA_QF_TYPES, outBitmapset(), pgpa_walk_recursively(), PGPAQF_GATHER, PGPAQF_GATHER_MERGE, PGPAQF_SEMIJOIN_NON_UNIQUE, PGPAQF_SEMIJOIN_UNIQUE, plan, PlannedStmt::planTree, PlannedStmt::subplans, and PlannedStmt::subrtinfos.
Referenced by pgpa_planner_shutdown().
|
static |
Definition at line 465 of file pgpa_walker.c.
References Assert, bms_add_members(), bms_copy(), fb(), lappend(), pgpa_process_unrolled_join(), pgpa_scan::relids, pgpa_join_member::scan, and pgpa_join_member::unrolled_join.
Referenced by pgpa_process_unrolled_join(), and pgpa_walk_recursively().
|
static |
Definition at line 649 of file pgpa_walker.c.
References fb(), pgpa_filter_out_join_relids(), pgpa_qf_add_rti(), pgpa_qf_add_rtis(), pgpa_relids(), pgpa_scanrelid(), and plan.
Referenced by pgpa_walk_recursively().
Definition at line 624 of file pgpa_walker.c.
References bms_add_member(), fb(), and foreach_ptr.
Referenced by pgpa_qf_add_plan_rtis().
Definition at line 636 of file pgpa_walker.c.
References bms_add_members(), fb(), and foreach_ptr.
Referenced by pgpa_qf_add_plan_rtis(), and pgpa_walk_recursively().
Definition at line 535 of file pgpa_walker.c.
References fb(), IsA, and plan.
Referenced by pgpa_build_scan(), and pgpa_qf_add_plan_rtis().
Definition at line 555 of file pgpa_walker.c.
References fb(), nodeTag, and plan.
Referenced by pgpa_build_scan(), and pgpa_qf_add_plan_rtis().
|
static |
Definition at line 214 of file pgpa_walker.c.
References Append::appendplans, Assert, fb(), foreach_node, foreach_ptr, IsA, lappend(), lfirst, list_copy(), list_delete_ptr(), list_length(), list_nth(), list_truncate(), MergeAppend::mergeplans, NIL, nodeTag, pgpa_add_feature(), pgpa_build_scan(), pgpa_build_unrolled_join(), pgpa_create_join_unroller(), pgpa_destroy_join_unroller(), pgpa_filter_out_join_relids(), pgpa_is_join(), pgpa_process_unrolled_join(), pgpa_qf_add_plan_rtis(), pgpa_qf_add_rtis(), pgpa_unroll_join(), pgpa_walk_recursively(), PGPAQF_GATHER, PGPAQF_GATHER_MERGE, and plan.
Referenced by pgpa_plan_walker(), and pgpa_walk_recursively().
|
static |
Definition at line 986 of file pgpa_walker.c.
References bms_equal(), fb(), foreach_ptr, and type.
Referenced by pgpa_walker_would_advise().
|
static |
Definition at line 1006 of file pgpa_walker.c.
References bms_equal(), fb(), and foreach_ptr.
Referenced by pgpa_walker_would_advise().
|
static |
Definition at line 1025 of file pgpa_walker.c.
References bms_is_subset(), and fb().
Referenced by pgpa_walker_would_advise().
|
static |
Definition at line 966 of file pgpa_walker.c.
References bms_equal(), fb(), and foreach_ptr.
Referenced by pgpa_walker_would_advise().
|
static |
Definition at line 823 of file pgpa_walker.c.
References elog, ERROR, fb(), get_namespace_name_or_temp(), get_rel_name(), get_rel_namespace(), pgpa_index_target::indname, pgpa_index_target::indnamespace, InvalidOid, IsA, nodeTag, and plan.
Referenced by pgpa_walker_would_advise().
|
static |
Definition at line 853 of file pgpa_walker.c.
References Assert, pgpa_advice_target::children, fb(), linitial, list_length(), list_nth(), PGPA_TARGET_ORDERED_LIST, pgpa_walker_join_order_matches_member(), and pgpa_advice_target::ttype.
Referenced by pgpa_walker_join_order_matches_member(), and pgpa_walker_would_advise().
|
static |
Definition at line 901 of file pgpa_walker.c.
References Assert, bms_add_member(), bms_equal(), bms_make_singleton(), pgpa_advice_target::children, fb(), foreach_ptr, pgpa_compute_rti_from_identifier(), PGPA_TARGET_IDENTIFIER, PGPA_TARGET_ORDERED_LIST, PGPA_TARGET_UNORDERED_LIST, pgpa_walker_join_order_matches(), pgpa_scan::relids, pgpa_advice_target::rid, pgpa_join_member::scan, pgpa_advice_target::ttype, and pgpa_join_member::unrolled_join.
Referenced by pgpa_walker_join_order_matches().
| bool pgpa_walker_would_advise | ( | pgpa_plan_walker_context * | walker, |
| pgpa_identifier * | rt_identifiers, | ||
| pgpa_advice_tag_type | tag, | ||
| pgpa_advice_target * | target | ||
| ) |
Definition at line 672 of file pgpa_walker.c.
References Assert, bms_add_member(), bms_make_singleton(), pgpa_advice_target::children, fb(), foreach_ptr, pgpa_advice_target::itarget, JSTRAT_HASH_JOIN, JSTRAT_MERGE_JOIN_MATERIALIZE, JSTRAT_MERGE_JOIN_PLAIN, JSTRAT_NESTED_LOOP_MATERIALIZE, JSTRAT_NESTED_LOOP_MEMOIZE, JSTRAT_NESTED_LOOP_PLAIN, list_length(), pg_unreachable, pgpa_compute_rti_from_identifier(), PGPA_SCAN_BITMAP_HEAP, PGPA_SCAN_FOREIGN, PGPA_SCAN_INDEX, PGPA_SCAN_INDEX_ONLY, PGPA_SCAN_PARTITIONWISE, PGPA_SCAN_SEQ, PGPA_SCAN_TID, PGPA_TAG_BITMAP_HEAP_SCAN, PGPA_TAG_FOREIGN_JOIN, PGPA_TAG_GATHER, PGPA_TAG_GATHER_MERGE, PGPA_TAG_HASH_JOIN, PGPA_TAG_INDEX_ONLY_SCAN, PGPA_TAG_INDEX_SCAN, PGPA_TAG_JOIN_ORDER, PGPA_TAG_MERGE_JOIN_MATERIALIZE, PGPA_TAG_MERGE_JOIN_PLAIN, PGPA_TAG_NESTED_LOOP_MATERIALIZE, PGPA_TAG_NESTED_LOOP_MEMOIZE, PGPA_TAG_NESTED_LOOP_PLAIN, PGPA_TAG_NO_GATHER, PGPA_TAG_PARTITIONWISE, PGPA_TAG_SEMIJOIN_NON_UNIQUE, PGPA_TAG_SEMIJOIN_UNIQUE, PGPA_TAG_SEQ_SCAN, PGPA_TAG_TID_SCAN, PGPA_TARGET_IDENTIFIER, PGPA_TARGET_ORDERED_LIST, pgpa_walker_contains_feature(), pgpa_walker_contains_join(), pgpa_walker_contains_no_gather(), pgpa_walker_find_scan(), pgpa_walker_index_target_matches_plan(), pgpa_walker_join_order_matches(), PGPAQF_GATHER, PGPAQF_GATHER_MERGE, PGPAQF_SEMIJOIN_NON_UNIQUE, PGPAQF_SEMIJOIN_UNIQUE, pgpa_scan::plan, pgpa_advice_target::rid, and pgpa_advice_target::ttype.
Referenced by pgpa_planner_append_feedback().