CUBRID Engine
latest
|
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <assert.h>
#include <values.h>
#include "jansson.h"
#include "parser.h"
#include "object_primitive.h"
#include "optimizer.h"
#include "query_planner.h"
#include "query_graph.h"
#include "environment_variable.h"
#include "misc_string.h"
#include "system_parameter.h"
#include "parser_message.h"
#include "intl_support.h"
#include "storage_common.h"
#include "xasl_analytic.hpp"
#include "xasl_generation.h"
#include "schema_manager.h"
#include "network_interface_cl.h"
#include "dbtype.h"
#include "regu_var.hpp"
Go to the source code of this file.
Typedefs | |
typedef int(* | QO_WALK_FUNCTION) (QO_PLAN *, void *) |
typedef enum PRED_CLASS | PRED_CLASS |
Enumerations | |
enum | JOIN_ORDER_TRY { JOIN_RIGHT_ORDER, JOIN_OPPOSITE_ORDER } |
enum | PRED_CLASS { PC_ATTR, PC_CONST, PC_HOST_VAR, PC_SUBQUERY, PC_SET, PC_OTHER, PC_MULTI_ATTR } |
Variables | |
static int | infos_allocated = 0 |
static int | infos_deallocated = 0 |
static int | qo_plans_allocated |
static int | qo_plans_deallocated |
static int | qo_plans_malloced |
static int | qo_plans_demalloced |
static int | qo_accumulating_plans |
static int | qo_next_tmpfile |
static QO_PLAN * | qo_plan_free_list |
static QO_PLAN_VTBL | qo_seq_scan_plan_vtbl |
static QO_PLAN_VTBL | qo_index_scan_plan_vtbl |
static QO_PLAN_VTBL | qo_sort_plan_vtbl |
static QO_PLAN_VTBL | qo_nl_join_plan_vtbl |
static QO_PLAN_VTBL | qo_idx_join_plan_vtbl |
static QO_PLAN_VTBL | qo_merge_join_plan_vtbl |
static QO_PLAN_VTBL | qo_follow_plan_vtbl |
static QO_PLAN_VTBL | qo_set_follow_plan_vtbl |
static QO_PLAN_VTBL | qo_worst_plan_vtbl |
QO_PLAN_VTBL * | all_vtbls [] |
#define __STR | ( | n | ) | __VAL(n) |
Definition at line 60 of file query_planner.c.
#define __VAL | ( | n | ) | #n |
Definition at line 61 of file query_planner.c.
#define DEFAULT_BETWEEN_SELECTIVITY (double) 0.01 |
Definition at line 376 of file query_planner.c.
Referenced by qo_between_selectivity(), and qo_range_selectivity().
#define DEFAULT_COMP_SELECTIVITY (double) 0.1 |
Definition at line 375 of file query_planner.c.
Referenced by qo_comp_selectivity(), and qo_range_selectivity().
#define DEFAULT_EQUAL_SELECTIVITY (double) 0.001 |
Definition at line 373 of file query_planner.c.
Referenced by qo_all_some_in_selectivity(), qo_equal_selectivity(), and qo_range_selectivity().
#define DEFAULT_EQUIJOIN_SELECTIVITY (double) 0.001 |
Definition at line 374 of file query_planner.c.
Referenced by qo_equal_selectivity(), and qo_range_selectivity().
#define DEFAULT_EXISTS_SELECTIVITY (double) 0.1 |
Definition at line 371 of file query_planner.c.
Referenced by qo_expr_selectivity().
#define DEFAULT_IN_SELECTIVITY (double) 0.01 |
Definition at line 377 of file query_planner.c.
Referenced by qo_all_some_in_selectivity().
#define DEFAULT_NULL_SELECTIVITY (double) 0.01 |
Definition at line 370 of file query_planner.c.
Referenced by qo_expr_selectivity().
#define DEFAULT_RANGE_SELECTIVITY (double) 0.1 |
Definition at line 378 of file query_planner.c.
Referenced by qo_range_selectivity().
#define DEFAULT_SELECTIVITY (double) 0.1 |
Definition at line 372 of file query_planner.c.
Referenced by qo_expr_selectivity(), and qo_plan_cmp().
#define FUDGE_FACTOR 0.7 |
Definition at line 70 of file query_planner.c.
Referenced by qo_iscan_cost().
#define INDENT_FMT "%*c" |
Definition at line 56 of file query_planner.c.
Referenced by qo_plan_fprint().
#define INDENT_INCR 4 |
Definition at line 55 of file query_planner.c.
Referenced by qo_follow_info(), qo_join_info(), qo_plan_fprint(), and qo_sort_info().
#define INDENTED_TITLE_FMT INDENT_FMT TITLE_FMT |
Definition at line 59 of file query_planner.c.
Referenced by qo_follow_fprint(), qo_join_fprint(), qo_plan_print_analytic_eval(), qo_plan_print_costs(), qo_plan_print_outer_join_terms(), qo_plan_print_projected_segs(), qo_plan_print_sarged_terms(), qo_plan_print_sort_spec_helper(), qo_plan_print_subqueries(), qo_scan_fprint(), and qo_sort_fprint().
#define ISCAN_OVERHEAD_FACTOR 1.2 |
Definition at line 71 of file query_planner.c.
Referenced by qo_iscan_cost().
#define NONGROUPED_SCAN_COST 0.1 |
Definition at line 73 of file query_planner.c.
Referenced by qo_nljoin_cost().
#define qo_follow_free qo_generic_free |
Definition at line 80 of file query_planner.c.
#define qo_generic_free NULL |
Definition at line 78 of file query_planner.c.
#define QO_INFO_INDEX | ( | _M_offset, | |
_bitset | |||
) | (_M_offset + (unsigned int)(BITPATTERN(_bitset) & planner->node_mask)) |
Definition at line 83 of file query_planner.c.
Referenced by planner_visit_node(), and qo_search_partition_join().
#define QO_IS_LIMIT_NODE | ( | env, | |
node | |||
) | (BITSET_MEMBER (QO_ENV_SORT_LIMIT_NODES ((env)), QO_NODE_IDX ((node)))) |
Definition at line 86 of file query_planner.c.
Referenced by qo_search_partition_join().
#define QO_PLAN_CMP_CHECK_COST | ( | a, | |
b | |||
) |
Referenced by qo_plan_cmp().
#define qo_scan_walk qo_generic_walk |
Definition at line 75 of file query_planner.c.
#define qo_sort_free qo_generic_free |
Definition at line 79 of file query_planner.c.
#define qo_worst_free qo_generic_free |
Definition at line 81 of file query_planner.c.
#define qo_worst_walk qo_generic_walk |
Definition at line 76 of file query_planner.c.
#define SORT_SPEC_FMT | ( | spec | ) |
Definition at line 62 of file query_planner.c.
Referenced by qo_plan_print_analytic_eval().
#define TEMP_SETUP_COST 5.0 |
Definition at line 72 of file query_planner.c.
Referenced by qo_sort_cost().
#define TITLE_FMT "%-" __STR(TITLE_WIDTH) "s" |
Definition at line 58 of file query_planner.c.
Referenced by qo_plan_fprint().
#define TITLE_WIDTH 7 |
Definition at line 57 of file query_planner.c.
#define VALID_INNER | ( | plan | ) |
Definition at line 67 of file query_planner.c.
Referenced by qo_join_new().
typedef enum PRED_CLASS PRED_CLASS |
typedef int(* QO_WALK_FUNCTION) (QO_PLAN *, void *) |
Definition at line 92 of file query_planner.c.
enum JOIN_ORDER_TRY |
Enumerator | |
---|---|
JOIN_RIGHT_ORDER | |
JOIN_OPPOSITE_ORDER |
Definition at line 89 of file query_planner.c.
enum PRED_CLASS |
Enumerator | |
---|---|
PC_ATTR | |
PC_CONST | |
PC_HOST_VAR | |
PC_SUBQUERY | |
PC_SET | |
PC_OTHER | |
PC_MULTI_ATTR |
Definition at line 382 of file query_planner.c.
|
static |
Definition at line 419 of file query_planner.c.
Referenced by qo_sort_cost().
|
static |
Definition at line 7189 of file query_planner.c.
References bitset_iterate(), bitset_next_member(), qo_planner::env, i, qo_plan::info, IO_PAGESIZE, qo_planner::node_info, NULL, qo_plan::plan_type, qo_plan::plan_un, PT_HINT_USE_IDX, PT_HINT_USE_MERGE, PT_HINT_USE_NL, QO_ENV_NODE, qo_find_best_plan_on_info(), QO_NODE_HINT, QO_NODE_IDX, QO_PLANTYPE_SORT, QO_UNORDERED, and qo_plan::sort.
Referenced by planner_permutate().
|
static |
Definition at line 7277 of file query_planner.c.
References qo_planner::best_info, bitset_add(), bitset_assign(), BITSET_CLEAR, bitset_delset(), bitset_difference(), bitset_init(), bitset_intersects(), bitset_is_empty(), bitset_iterate(), BITSET_MEMBER, bitset_next_member(), bitset_remove(), bitset_subset(), bitset_union(), qo_planner::env, qo_plan::fixed_cpu_cost, qo_plan::fixed_io_cost, i, qo_planner::node_info, qo_info::nodes, NULL, planner_nodeset_join_cost(), planner_visit_node(), PT_HINT_ORDERED, QO_ENV_NODE, qo_find_best_plan_on_info(), QO_NODE_DEP_SET, QO_NODE_IDX, QO_NODE_OUTER_DEP_SET, QO_NODE_REL_IDX, QO_UNORDERED, qo_info::terms, qo_plan::variable_cpu_cost, and qo_plan::variable_io_cost.
Referenced by qo_search_partition_join().
|
static |
Definition at line 6469 of file query_planner.c.
References qo_planner::best_info, qo_info::best_no_order, bitset_add(), bitset_assign(), bitset_cardinality(), bitset_delset(), bitset_difference(), bitset_init(), bitset_is_empty(), bitset_is_equivalent(), bitset_iterate(), BITSET_MEMBER, bitset_next_member(), bitset_remove(), bitset_subset(), bitset_union(), qo_info::cardinality, qo_planner::env, qo_info::eqclasses, i, IS_OUTER_JOIN_TYPE, qo_planner::join_info, JOIN_INNER, JOIN_RIGHT, qo_info::join_unit, qo_planner::join_unit, NO_JOIN, qo_planner::node_info, qo_subquery::nodes, qo_planvec::nplans, NULL, PT_HINT_ORDERED, qo_alloc_info(), QO_ASSERT, QO_ENV_NODE, QO_ENV_TERM, qo_examine_follow(), qo_examine_idx_join(), qo_examine_merge_join(), qo_examine_nl_join(), QO_INFO_INDEX, QO_IS_EDGE_TERM, QO_IS_PATH_TERM, QO_NODE_DEP_SET, QO_NODE_IDX, QO_NODE_LOCATION, QO_NODE_OUTER_DEP_SET, QO_NODE_REL_IDX, QO_ON_COND_TERM, QO_PARTITION_M_OFFSET, QO_PARTITION_NODES, QO_TC_AFTER_JOIN, QO_TC_DEP_JOIN, QO_TC_DEP_LINK, QO_TC_DUMMY_JOIN, QO_TC_DURING_JOIN, QO_TC_JOIN, QO_TC_OTHER, QO_TC_PATH, QO_TERM_CAN_USE_INDEX, QO_TERM_CLASS, QO_TERM_HEAD, QO_TERM_IS_FLAGED, QO_TERM_JOIN_TYPE, QO_TERM_LOCATION, QO_TERM_MERGEABLE_EDGE, QO_TERM_NODES, QO_TERM_SELECTIVITY, QO_TERM_TAIL, qo_planner::subqueries, qo_planner::term, qo_info::terms, qo_subquery::terms, and UNEXPECTED_CASE.
Referenced by planner_permutate().
Definition at line 9667 of file query_planner.c.
References pt_expr_info::arg1, pt_expr_info::arg2, pt_function_info::arg_list, pt_value_info::data_value, DEFAULT_EQUAL_SELECTIVITY, DEFAULT_IN_SELECTIVITY, pt_statement_info::expr, pt_statement_info::function, parser_node::info, parser_node::next, PC_ATTR, PC_MULTI_ATTR, PC_SET, PC_SUBQUERY, pt_is_function, pt_length_of_list(), qo_classify(), qo_index_cardinality(), pt_statement_info::query, pt_data_value::set, pt_statement_info::value, and pt_query_info::xasl.
Referenced by qo_expr_selectivity().
|
static |
Definition at line 5180 of file query_planner.c.
References ARG_FILE_LINE, qo_info::best_no_order, bitset_assign(), bitset_init(), qo_info::cardinality, qo_info::detached, qo_info::env, qo_planner::env, qo_planner::EQ, qo_info::eqclasses, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), free_and_init, i, qo_planner::info_list, infos_allocated, qo_info::join_unit, qo_planner::join_unit, qo_info::next, qo_info::nodes, NULL, qo_info::planner, qo_info::planvec, qo_info::projected_segs, qo_info::projected_size, qo_compute_projected_segs(), qo_compute_projected_size(), qo_init_planvec(), and qo_info::terms.
Referenced by planner_visit_node(), qo_combine_partitions(), and qo_search_planner().
|
static |
Definition at line 6297 of file query_planner.c.
References qo_planner::all_subqueries, ARG_FILE_LINE, qo_planner::best_info, bitset_add(), bitset_assign(), bitset_init(), qo_planner::cleanup_needed, qo_planner::cp_info, DB_UINT32_MAX, qo_planner::E, qo_planner::env, qo_planner::EQ, qo_planner::eqclass, qo_env::eqclasses, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), qo_planner::final_segs, qo_env::final_segs, i, qo_planner::info_list, qo_planner::join_info, qo_planner::join_unit, qo_planner::M, qo_planner::N, qo_env::nedges, qo_env::neqclasses, qo_env::nnodes, qo_planner::node, qo_planner::node_info, qo_planner::node_mask, qo_env::nodes, qo_env::npartitions, qo_env::nsegs, qo_env::nsubqueries, qo_env::nterms, NULL, qo_planner::P, qo_planner::partition, qo_env::partitions, qo_env::planner, qo_planner::Q, qo_planner::S, qo_planner::segment, qo_env::segs, qo_planner::subqueries, qo_env::subqueries, qo_planner::T, qo_planner::term, and qo_env::terms.
Referenced by qo_planner_search().
|
static |
Definition at line 9207 of file query_planner.c.
References QO_ASSERT.
Referenced by qo_expr_selectivity().
Definition at line 9517 of file query_planner.c.
References pt_expr_info::arg2, DEFAULT_BETWEEN_SELECTIVITY, pt_statement_info::expr, parser_node::info, parser_node::node_type, pt_expr_info::op, PT_EXPR, pt_is_between_range_op(), and QO_ASSERT.
Referenced by qo_expr_selectivity().
Definition at line 10685 of file query_planner.c.
References pt_sort_spec_info::asc_or_desc, qo_info::env, pt_select_info::group_by, pt_select_info::hint, qo_plan::info, parser_node::info, parser_node::next, NULL, qo_env::parser, PT_ASC, PT_DESC, PT_HINT_NO_IDX_DESC, pt_sort_spec_cover_groupby(), pt_query_info::q, QO_ENV_PT_TREE, pt_statement_info::query, pt_query_info::select, and pt_statement_info::sort_spec.
Referenced by qo_top_plan_new().
Definition at line 5311 of file query_planner.c.
References qo_info::best_no_order, bitset_is_empty(), bitset_is_equivalent(), cmp, qo_info::env, qo_planner::EQ, qo_planner::eqclass, qo_plan::has_sort_limit, i, qo_info::nodes, NULL, qo_plan::order, PLAN_COMP_EQ, PLAN_COMP_GT, PLAN_COMP_LT, qo_plan::plan_type, qo_plan::plan_un, qo_info::planner, qo_info::planvec, qo_check_plan_on_info(), qo_check_planvec(), QO_ENV_SORT_LIMIT_NODES, QO_ENV_USE_SORT_LIMIT, QO_EQCLASS_SEGS, qo_find_best_plan_on_planvec(), qo_plan_is_orderby_skip_candidate(), qo_plan_order_by(), qo_plan_release, QO_PLANTYPE_SORT, QO_SL_USE, qo_sort_new(), QO_UNORDERED, qo_plan::sort, and SORT_LIMIT.
Referenced by qo_check_plan_on_info().
Definition at line 10546 of file query_planner.c.
References pt_sort_spec_info::asc_or_desc, qo_info::env, pt_select_info::hint, qo_plan::info, parser_node::info, qo_plan::iscan_sort_list, parser_node::next, NULL, pt_query_info::order_by, PT_ASC, PT_DESC, PT_HINT_NO_IDX_DESC, pt_sort_spec_cover(), pt_query_info::q, QO_ENV_PT_TREE, pt_statement_info::query, pt_query_info::select, and pt_statement_info::sort_spec.
Referenced by qo_plan_is_orderby_skip_candidate(), and qo_top_plan_new().
Definition at line 5391 of file query_planner.c.
References qo_planner::best_info, qo_info::best_no_order, cmp, qo_info::join_unit, qo_planner::join_unit, NULL, qo_plan::order, PLAN_COMP_EQ, PLAN_COMP_GT, PLAN_COMP_LT, qo_plan::plan_un, qo_info::planner, qo_info::planvec, qo_check_new_best_plan_on_info(), qo_check_planvec(), qo_cmp_planvec(), QO_EQCLASS_IDX, qo_is_iscan_from_groupby(), qo_is_iscan_from_orderby(), qo_plan_release, QO_UNORDERED, and qo_plan::scan.
Referenced by qo_check_new_best_plan_on_info(), qo_examine_follow(), qo_examine_merge_join(), qo_examine_nl_join(), qo_generate_index_scan(), qo_generate_join_index_scan(), qo_generate_loose_index_scan(), qo_generate_seq_scan(), qo_generate_sort_limit_plan(), and qo_search_planner().
|
static |
Definition at line 4882 of file query_planner.c.
References cmp, qo_plan::fixed_cpu_cost, qo_plan::fixed_io_cost, i, NPLANS, qo_planvec::nplans, NULL, p, qo_planvec::plan, PLAN_COMP_EQ, PLAN_COMP_GT, PLAN_COMP_LT, qo_plan_add_ref, qo_plan_cmp(), qo_plan_del_ref, qo_plan::variable_cpu_cost, and qo_plan::variable_io_cost.
Referenced by qo_check_new_best_plan_on_info(), qo_check_plan_on_info(), and qo_find_best_plan_on_info().
|
static |
Definition at line 9753 of file query_planner.c.
References pt_function_info::arg_list, pt_statement_info::function, parser_node::info, parser_node::next, parser_node::node_type, PC_ATTR, PC_CONST, PC_HOST_VAR, PC_MULTI_ATTR, PC_OTHER, PC_SET, PC_SUBQUERY, PT_DIFFERENCE, PT_DOT_, PT_FUNCTION, PT_HOST_VAR, PT_INTERSECTION, PT_IS_SET_TYPE, PT_NAME, PT_SELECT, PT_TYPE_NULL, PT_UNION, PT_VALUE, and parser_node::type_enum.
Referenced by qo_all_some_in_selectivity(), qo_equal_selectivity(), and qo_range_selectivity().
|
static |
Definition at line 8417 of file query_planner.c.
References qo_planner::all_subqueries, bitset_delset(), qo_planner::cleanup_needed, qo_planner::env, qo_planner::final_segs, and qo_plans_teardown().
Referenced by qo_planner_free(), and qo_planner_search().
|
static |
Definition at line 5085 of file query_planner.c.
References cmp, i, qo_planvec::nplans, qo_planvec::plan, PLAN_COMP_UNK, and qo_plan_cmp().
Referenced by qo_check_plan_on_info().
|
static |
Definition at line 8911 of file query_planner.c.
References bitset_add(), bitset_assign(), BITSET_CLEAR, bitset_delset(), bitset_init(), bitset_is_empty(), bitset_iterate(), BITSET_MEMBER, bitset_next_member(), bitset_remove(), bitset_subset(), bitset_union(), qo_planner::cp_info, qo_planner::E, qo_planner::env, i, qo_plan::info, qo_subquery::nodes, NULL, qo_planner::P, qo_planner::partition, qo_plan::plan_type, qo_plan::plan_un, qo_alloc_info(), qo_cp_new(), qo_detach_info(), QO_PARTITION_PLAN, qo_plan_discard(), qo_plan_finalize(), QO_PLANTYPE_SORT, QO_TC_TOTALLY_AFTER_JOIN, QO_TERM_CLASS, QO_TERM_NODES, qo_plan::sarged_terms, qo_plan::sort, sort_partitions(), qo_planner::subqueries, qo_planner::T, qo_planner::term, and qo_subquery::terms.
Referenced by qo_search_planner().
Definition at line 9503 of file query_planner.c.
References DEFAULT_COMP_SELECTIVITY.
Referenced by qo_expr_selectivity().
|
static |
Definition at line 6168 of file query_planner.c.
References bitset_assign(), BITSET_CLEAR, bitset_delset(), bitset_init(), bitset_intersect(), BITSET_MEMBER, bitset_union(), qo_planner::env, qo_planner::final_segs, i, qo_planner::N, qo_planner::node, QO_NODE_SEGS, QO_TERM_SEGS, qo_planner::T, and qo_planner::term.
Referenced by qo_alloc_info().
|
static |
Definition at line 6213 of file query_planner.c.
References bitset_iterate(), bitset_next_member(), qo_planner::env, i, QO_ENV_SEG, and qo_seg_width().
Referenced by qo_alloc_info().
|
static |
Definition at line 3381 of file query_planner.c.
References bitset_delset(), bitset_init(), qo_info::env, JOIN_INNER, qo_join_new(), and QO_JOINMETHOD_NL_JOIN.
Referenced by qo_combine_partitions().
|
static |
Definition at line 5282 of file query_planner.c.
References qo_info::best_no_order, qo_info::detached, qo_planner::EQ, free_and_init, i, qo_info::planner, qo_info::planvec, and qo_uninit_planvec().
Referenced by qo_combine_partitions(), qo_free_info(), and qo_search_partition().
|
static |
Definition at line 6242 of file query_planner.c.
References qo_info::best_no_order, bitset_print(), qo_planner::EQ, i, qo_planvec::nplans, qo_info::planner, qo_info::planvec, qo_info::projected_segs, and qo_dump_planvec().
Referenced by qo_dump_planner_info().
|
static |
Definition at line 6404 of file query_planner.c.
References bitset_is_empty(), bitset_iterate(), BITSET_MEMBER, bitset_next_member(), qo_info::detached, qo_planner::env, i, qo_planner::join_info, qo_planner::N, qo_planner::node_info, qo_info::nodes, qo_dump_info(), QO_ENV_NODE, QO_JOIN_INFO_SIZE, QO_NODE_IDX, QO_PARTITION_EDGES, QO_PARTITION_M_OFFSET, and QO_PARTITION_NODES.
Referenced by qo_search_partition().
|
static |
Definition at line 4857 of file query_planner.c.
References i, qo_planvec::nplans, NULL, qo_planvec::overflow, qo_planvec::plan, and qo_plan_fprint().
Referenced by qo_dump_info().
Definition at line 9245 of file query_planner.c.
References pt_expr_info::arg1, pt_expr_info::arg2, pt_function_info::arg_list, DEFAULT_EQUAL_SELECTIVITY, DEFAULT_EQUIJOIN_SELECTIVITY, pt_statement_info::expr, pt_statement_info::function, parser_node::info, parser_node::next, PC_ATTR, PC_CONST, PC_HOST_VAR, PC_MULTI_ATTR, PC_OTHER, PC_SET, PC_SUBQUERY, qo_classify(), and qo_index_cardinality().
Referenced by qo_expr_selectivity().
|
static |
Definition at line 5985 of file query_planner.c.
References bitset_add(), bitset_delset(), bitset_first_member(), bitset_init(), bitset_intersects(), bitset_iterate(), bitset_next_member(), bitset_union(), qo_info::env, qo_index_entry::force, qo_node_index_entry::head, i, IS_OUTER_JOIN_TYPE, qo_node_index_entry::n, qo_planner::node, qo_info::nodes, NULL, qo_plan::plan_type, qo_info::planner, PT_HINT_USE_IDX, QO_ENV_TERM, qo_find_best_plan_on_info(), qo_generate_join_index_scan(), QO_NI_ENTRY, QO_NI_N, QO_NODE_ENV, QO_NODE_HINT, QO_NODE_INDEXES, QO_NODE_SARGS, QO_PLANTYPE_FOLLOW, QO_TC_AFTER_JOIN, QO_TERM_CLASS, QO_UNORDERED, and qo_index_entry::terms.
Referenced by qo_examine_idx_join().
|
static |
Definition at line 6138 of file query_planner.c.
References qo_node::entity_spec, pt_spec_info::flat_entity_list, parser_node::info, NULL, qo_check_plan_on_info(), qo_find_best_plan_on_info(), qo_follow_new(), QO_UNORDERED, pt_statement_info::spec, and qo_term::tail.
Referenced by planner_visit_node().
|
static |
Definition at line 5599 of file query_planner.c.
References bitset_cardinality(), bitset_first_member(), qo_info::env, JOIN_LEFT, JOIN_RIGHT, qo_node_index_entry::n, qo_info::nodes, PT_HINT_ORDERED, PT_HINT_USE_IDX, PT_HINT_USE_MERGE, PT_HINT_USE_NL, QO_ENV_NODE, qo_examine_correlated_index(), and QO_NODE_HINT.
Referenced by planner_visit_node().
|
static |
Definition at line 5825 of file query_planner.c.
References bitset_first_member(), bitset_init(), bitset_intersects(), bitset_iterate(), BITSET_MEMBER, bitset_next_member(), qo_info::env, qo_env::fake_terms, IS_OUTER_JOIN_TYPE, JOIN_LEFT, qo_node_index_entry::n, qo_info::nodes, NULL, qo_plan::order, qo_plan::plan_type, prm_get_bool_value(), PRM_ID_OPTIMIZER_ENABLE_MERGE_JOIN, PT_HINT_USE_IDX, PT_HINT_USE_MERGE, PT_HINT_USE_NL, qo_check_plan_on_info(), QO_ENV_NODE, QO_ENV_TERM, qo_find_best_plan_on_info(), qo_join_new(), QO_JOINMETHOD_MERGE_JOIN, QO_NODE_HINT, QO_NODE_IDX, QO_PLANTYPE_FOLLOW, QO_PLANTYPE_SCAN, QO_PLANTYPE_SORT, QO_TERM_EQCLASS, QO_TERM_HEAD, QO_TERM_NODES, QO_TERM_TAIL, and QO_UNORDERED.
Referenced by planner_visit_node().
|
static |
Definition at line 5673 of file query_planner.c.
References bitset_cardinality(), bitset_first_member(), bitset_intersects(), bitset_iterate(), bitset_next_member(), qo_info::env, qo_env::fake_terms, JOIN_LEFT, JOIN_RIGHT, qo_node_index_entry::n, qo_info::nodes, NULL, qo_plan::order, qo_plan::plan_type, PT_HINT_ORDERED, PT_HINT_USE_IDX, PT_HINT_USE_MERGE, PT_HINT_USE_NL, qo_check_plan_on_info(), QO_ENV_NODE, QO_ENV_TERM, qo_find_best_nljoin_inner_plan_on_info(), qo_find_best_plan_on_info(), qo_join_new(), QO_JOINMETHOD_NL_JOIN, QO_NODE_HINT, QO_PLANTYPE_FOLLOW, QO_PLANTYPE_SCAN, QO_PLANTYPE_SORT, QO_TC_DEP_LINK, QO_TERM_CLASS, and QO_UNORDERED.
Referenced by planner_visit_node().
Definition at line 9044 of file query_planner.c.
References pt_expr_info::arg1, pt_expr_info::arg2, DEFAULT_EXISTS_SELECTIVITY, DEFAULT_NULL_SELECTIVITY, DEFAULT_SELECTIVITY, pt_statement_info::expr, parser_node::info, parser_node::node_type, NULL, pt_expr_info::op, parser_node::or_next, prm_get_float_value(), PRM_ID_LIKE_TERM_SELECTIVITY, PT_AND, PT_BETWEEN, PT_EQ, PT_EQ_ALL, PT_EQ_SOME, PT_EXISTS, PT_EXPR, PT_GE, PT_GE_ALL, PT_GE_SOME, PT_GT, PT_GT_ALL, PT_GT_SOME, PT_IS, PT_IS_IN, PT_IS_NOT, PT_IS_NOT_IN, PT_IS_NOT_NULL, PT_IS_NULL, PT_LE, PT_LE_ALL, PT_LE_SOME, PT_LIKE, PT_LIKE_ESCAPE, PT_LT, PT_LT_ALL, PT_LT_SOME, PT_NE, PT_NE_ALL, PT_NE_SOME, PT_NOT, PT_NOT_BETWEEN, PT_NOT_LIKE, PT_NULLSAFE_EQ, PT_OR, PT_RANGE, PT_SETEQ, PT_SETNEQ, PT_SUBSET, PT_SUBSETEQ, PT_SUPERSET, PT_SUPERSETEQ, PT_XOR, qo_all_some_in_selectivity(), qo_and_selectivity(), QO_ASSERT, qo_between_selectivity(), qo_comp_selectivity(), qo_equal_selectivity(), qo_not_selectivity(), qo_or_selectivity(), and qo_range_selectivity().
Referenced by qo_analyze_term().
|
static |
Definition at line 5491 of file query_planner.c.
References qo_plan::analytic_eval_list, qo_info::best_no_order, qo_info::env, qo_plan::fixed_cpu_cost, qo_plan::fixed_io_cost, qo_plan::has_sort_limit, i, qo_plan::info, qo_plan::iscan_sort_list, qo_plan::join, qo_plan::multi_range_opt_use, NULL, qo_planvec::plan, PLAN_MULTI_RANGE_OPT_NO, qo_plan::plan_un, qo_is_seq_scan(), qo_nljoin_cost(), qo_plan_add_to_free_list(), qo_plan_malloc(), qo_plan::refcount, qo_plan::top_rooted, qo_plan::variable_cpu_cost, qo_plan::variable_io_cost, and qo_plan::well_rooted.
Referenced by qo_examine_nl_join().
|
static |
Definition at line 5562 of file query_planner.c.
References qo_info::best_no_order, qo_planvec::nplans, qo_info::planvec, qo_check_planvec(), QO_EQCLASS_IDX, qo_find_best_plan_on_planvec(), qo_sort_new(), QO_UNORDERED, and SORT_TEMP.
Referenced by planner_nodeset_join_cost(), planner_permutate(), qo_examine_correlated_index(), qo_examine_follow(), qo_examine_merge_join(), qo_examine_nl_join(), qo_search_partition(), qo_search_partition_join(), and qo_search_planner().
|
static |
Definition at line 5113 of file query_planner.c.
References qo_plan::fixed_cpu_cost, qo_plan::fixed_io_cost, i, qo_planvec::nplans, qo_planvec::plan, qo_plan::variable_cpu_cost, and qo_plan::variable_io_cost.
Referenced by qo_check_new_best_plan_on_info(), and qo_find_best_plan_on_info().
|
static |
Definition at line 3325 of file query_planner.c.
References qo_plan::fixed_cpu_cost, qo_plan::fixed_io_cost, qo_plan::follow, qo_node_index_entry::head, qo_plan::info, qo_plan::plan_un, prm_get_integer_value(), PRM_ID_PB_NBUFFERS, QO_CPU_WEIGHT, QO_INFINITY, QO_NODE_TCARD, QO_TERM_TAIL, qo_worst_cost(), qo_plan::variable_cpu_cost, and qo_plan::variable_io_cost.
|
static |
Definition at line 3298 of file query_planner.c.
References qo_plan::follow, INDENTED_TITLE_FMT, qo_plan::plan_un, qo_plan_fprint(), and qo_term_fprint().
|
static |
Definition at line 3313 of file query_planner.c.
References qo_plan::follow, INDENT_INCR, qo_plan::plan_un, qo_plan_lite_print(), qo_term_string(), and qo_plan::vtbl.
|
static |
Definition at line 3224 of file query_planner.c.
References qo_plan::analytic_eval_list, bitset_assign(), bitset_remove(), bitset_union(), qo_info::env, qo_plan::follow, qo_plan::info, qo_plan::iscan_sort_list, qo_plan::multi_range_opt_use, NULL, qo_plan::order, PLAN_MULTI_RANGE_OPT_NO, qo_plan::plan_type, qo_plan::plan_un, QO_ASSERT, qo_follow_plan_vtbl, QO_NODE_SARGS, QO_NODE_SUBQUERIES, qo_plan_add_ref, qo_plan_compute_cost(), qo_plan_malloc(), QO_PLANTYPE_FOLLOW, QO_TERM_IDX, QO_TERM_TAIL, qo_top_plan_new(), QO_UNORDERED, qo_plan::refcount, qo_plan::sarged_terms, qo_plan::subqueries, qo_plan::top_rooted, qo_plan::vtbl, and qo_plan::well_rooted.
Referenced by qo_examine_follow().
|
static |
Definition at line 3277 of file query_planner.c.
References qo_plan::follow, and qo_plan::plan_un.
|
static |
Definition at line 5257 of file query_planner.c.
References bitset_delset(), qo_info::eqclasses, free_and_init, infos_deallocated, qo_info::nodes, NULL, qo_info::projected_segs, qo_detach_info(), and qo_info::terms.
Referenced by qo_planner_free().
|
static |
Definition at line 7738 of file query_planner.c.
References assert, bitset_add(), bitset_assign(), bitset_delset(), bitset_first_member(), bitset_init(), bitset_iterate(), bitset_next_member(), bitset_remove(), qo_info::env, qo_index_entry::force, qo_node_index_entry::head, i, qo_index_entry::ils_prefix_len, qo_index_entry::is_iss_candidate, qo_index_entry::multi_col_range_segs, qo_node_index_entry::n, NULL, qo_check_plan_on_info(), QO_ENTRY_MULTI_COL, QO_ENV_TERM, qo_index_scan_new(), QO_SCANMETHOD_INDEX_SCAN, QO_TERM_IS_FLAGED, QO_TERM_MULTI_COLL_PRED, qo_index_entry::seg_equal_terms, qo_index_entry::seg_idxs, and qo_index_entry::seg_other_terms.
Referenced by qo_search_planner().
|
static |
Definition at line 7488 of file query_planner.c.
References assert, bitset_add(), bitset_assign(), bitset_delset(), bitset_difference(), bitset_init(), bitset_is_empty(), bitset_iterate(), BITSET_MEMBER, bitset_next_member(), bitset_remove(), qo_term::can_use_index, qo_info::env, qo_index_entry::force, qo_node_index_entry::head, i, qo_term::index_seg, JOIN_INNER, qo_term::multi_col_cnt, qo_index_entry::multi_col_range_segs, qo_term::multi_col_segs, qo_node_index_entry::n, qo_index_entry::nsegs, NULL, qo_plan::plan_un, qo_check_plan_on_info(), QO_ENV_TERM, qo_index_scan_new(), qo_join_new(), QO_JOINMETHOD_IDX_JOIN, QO_NODE_IS_CLASS_HIERARCHY, QO_NODE_IS_CLASS_PARTITIONED, QO_SCANMETHOD_INDEX_SCAN, QO_SEG_IDX, QO_TC_DUMMY_JOIN, QO_TERM_CLASS, QO_TERM_EQUAL_OP, QO_TERM_IDX, QO_TERM_IS_FLAGED, QO_TERM_MULTI_COLL_PRED, QO_TERM_RANGELIST, qo_plan::scan, qo_index_entry::seg_equal_terms, and qo_index_entry::seg_idxs.
Referenced by qo_examine_correlated_index().
|
static |
Definition at line 7845 of file query_planner.c.
References assert, bitset_delset(), bitset_init(), bitset_is_empty(), qo_index_entry::cover_segments, qo_info::env, qo_index_entry::force, qo_node_index_entry::head, qo_index_entry::ils_prefix_len, qo_index_entry::is_iss_candidate, qo_node_index_entry::n, NULL, qo_check_plan_on_info(), QO_ENTRY_MULTI_COL, qo_index_scan_new(), QO_SCANMETHOD_INDEX_SCAN, and qo_index_entry::seg_equal_terms.
Referenced by qo_search_planner().
Definition at line 7696 of file query_planner.c.
References qo_node_index_entry::n, qo_check_plan_on_info(), and qo_seq_scan_new().
Referenced by qo_search_planner().
Definition at line 7887 of file query_planner.c.
References qo_node_index_entry::n, NULL, qo_plan::order, qo_check_plan_on_info(), qo_sort_new(), QO_UNORDERED, and SORT_LIMIT.
Referenced by qo_search_planner().
|
static |
Definition at line 1078 of file query_planner.c.
|
static |
Definition at line 10432 of file query_planner.c.
References assert, qo_index_entry::groupby_skip, NULL, PLAN_COMP_EQ, PLAN_COMP_GT, PLAN_COMP_LT, PLAN_COMP_UNK, qo_plan::plan_un, qo_is_index_iss_scan(), qo_is_index_loose_scan(), qo_is_interesting_order_scan(), qo_plan_iscan_terms_cmp(), and qo_plan::scan.
Referenced by qo_plan_cmp().
|
static |
Definition at line 7916 of file query_planner.c.
References assert, bitset_intersects(), qo_node::env, pt_statement_info::expr, i, parser_node::info, qo_env::nterms, NULL, pt_expr_info::op, parser_node::or_next, PT_IS_EXPR_NODE, PT_IS_NOT_NULL, PT_IS_NULL, QO_ENV_TERM, QO_NODE_ENV, QO_NODE_SEGS, QO_TERM_PT_EXPR, and QO_TERM_SEGS.
Definition at line 11136 of file query_planner.c.
References qo_plan::join, NULL, qo_plan::plan_type, qo_plan::plan_un, qo_has_sort_limit_subplan(), QO_PLANTYPE_FOLLOW, QO_PLANTYPE_JOIN, QO_PLANTYPE_SCAN, QO_PLANTYPE_SORT, QO_PLANTYPE_WORST, qo_plan::sort, and SORT_LIMIT.
Referenced by pt_set_limit_optimization_flags(), and qo_has_sort_limit_subplan().
Definition at line 9824 of file query_planner.c.
References pt_dot_info::arg2, BTREE_STATS_PKEYS_NUM, qo_attr_info::cum_stats, pt_statement_info::dot, parser_node::info, QO_ATTR_CUM_STATS::is_indexed, lookup_node(), lookup_seg(), pt_name_info::meta_class, pt_statement_info::name, parser_node::node_type, NULL, QO_ATTR_CUM_STATS::pkeys, QO_ATTR_CUM_STATS::pkeys_size, PT_DOT_, PT_NAME, PT_RESERVED, QO_ASSERT, and QO_SEG_INFO.
Referenced by qo_all_some_in_selectivity(), qo_equal_selectivity(), and qo_range_selectivity().
|
static |
Definition at line 4321 of file query_planner.c.
References assert, bitset_cardinality(), NULL, PLAN_COMP_EQ, PLAN_COMP_GT, PLAN_COMP_LT, PLAN_COMP_UNK, qo_plan::plan_un, qo_is_index_covering_scan(), qo_is_index_iss_scan(), qo_is_index_loose_scan(), qo_is_interesting_order_scan(), qo_plan_iscan_terms_cmp(), and qo_plan::scan.
Referenced by qo_multi_range_opt_plans_cmp(), and qo_plan_cmp().
|
static |
Definition at line 1498 of file query_planner.c.
References sm_class_constraint::attributes, qo_index_entry::col_num, qo_index_entry::constraints, DB_TYPE_BIT, DB_TYPE_VARBIT, sm_attribute::domain, and TP_DOMAIN_TYPE.
Referenced by qo_index_scan_new().
|
static |
Definition at line 1527 of file query_planner.c.
References assert, bitset_add(), bitset_assign(), bitset_delset(), bitset_difference(), bitset_init(), bitset_intersect(), bitset_intersects(), bitset_is_empty(), bitset_iterate(), BITSET_MEMBER, bitset_next_member(), bitset_subset(), bitset_union(), qo_term::can_use_index, qo_index_entry::constraints, qo_index_entry::cover_segments, qo_info::env, qo_index_entry::force, sm_class_constraint::func_index_info, qo_node_index_entry::head, qo_index_entry::ils_prefix_len, qo_index_entry::is_iss_candidate, qo_plan::iscan_sort_list, qo_index_entry::multi_col_range_segs, qo_plan::multi_range_opt_use, qo_index_entry::nsegs, NULL, PLAN_MULTI_RANGE_OPT_USE, qo_plan::plan_un, qo_check_iscan_for_multi_range_opt(), QO_ENV_TERM, qo_index_has_bit_attr(), qo_index_scan_plan_vtbl, qo_is_filter_index(), qo_is_index_covering_scan(), qo_is_index_loose_scan(), qo_is_iscan(), qo_is_iscan_from_groupby(), qo_is_iscan_from_orderby(), qo_is_prefix_index(), QO_NODE_SEGS, qo_plan_compute_cost(), qo_plan_compute_iscan_sort_list(), qo_plan_release, qo_scan_new(), QO_SCANMETHOD_INDEX_GROUPBY_SCAN, QO_SCANMETHOD_INDEX_ORDERBY_SCAN, QO_SCANMETHOD_INDEX_SCAN, QO_SCANMETHOD_INDEX_SCAN_INSPECT, QO_TERM_EQUAL_OP, QO_TERM_IS_FLAGED, QO_TERM_NON_IDX_SARG_COLL, QO_TERM_SEGS, QO_TERM_SUBQUERIES, qo_top_plan_new(), qo_plan::sarged_terms, qo_plan::scan, qo_index_entry::seg_idxs, and qo_plan::vtbl.
Referenced by qo_generate_index_scan(), qo_generate_join_index_scan(), qo_generate_loose_index_scan(), and qo_search_planner().
|
static |
Definition at line 5164 of file query_planner.c.
References infos_allocated, and infos_deallocated.
Referenced by qo_planner_search().
void qo_info_stats | ( | FILE * | f | ) |
Definition at line 6286 of file query_planner.c.
References infos_allocated, and infos_deallocated.
Referenced by qo_print_stats().
|
static |
Definition at line 4817 of file query_planner.c.
References i, NPLANS, qo_planvec::nplans, NULL, qo_planvec::overflow, and qo_planvec::plan.
Referenced by qo_alloc_info().
Definition at line 9883 of file query_planner.c.
References qo_plan::plan_un, qo_is_iscan(), and qo_plan::scan.
Referenced by qo_plan_cmp().
Definition at line 11060 of file query_planner.c.
References qo_is_iscan(), qo_is_iscan_from_groupby(), and qo_is_iscan_from_orderby().
Referenced by pt_to_index_info(), qo_check_terms_for_multiple_range_opt(), qo_find_subplan_using_multi_range_opt(), qo_get_key_limit_from_instnum(), qo_get_xasl_index_info(), qo_group_by_skip_plans_cmp(), qo_index_covering_plans_cmp(), qo_is_index_covering_scan(), qo_is_index_iss_scan(), qo_is_index_mro_scan(), qo_order_by_skip_plans_cmp(), qo_plan_cmp(), qo_plan_cmp_prefer_covering_index(), qo_plan_compute_iscan_sort_list(), qo_plan_iscan_terms_cmp(), qo_plan_multi_range_opt(), qo_scan_fprint(), qo_search_planner(), and qo_top_plan_new().
Definition at line 7717 of file query_planner.c.
References qo_plan::plan_type, qo_plan::plan_un, QO_PLANTYPE_SCAN, QO_SCANMETHOD_INDEX_SCAN, QO_SCANMETHOD_INDEX_SCAN_INSPECT, and qo_plan::scan.
Referenced by gen_outer(), qo_check_iscan_for_multi_range_opt(), qo_check_plan_index_for_multi_range_opt(), qo_index_scan_new(), qo_is_all_unique_index_columns_are_equi_terms(), qo_is_index_loose_scan(), qo_is_interesting_order_scan(), qo_nljoin_cost(), qo_scan_info(), qo_search_partition_join(), qo_set_orderby_skip(), and qo_set_use_desc().
Definition at line 10608 of file query_planner.c.
References qo_plan::plan_type, qo_plan::plan_un, QO_PLANTYPE_SCAN, QO_SCANMETHOD_INDEX_GROUPBY_SCAN, and qo_plan::scan.
Referenced by qo_check_plan_on_info(), qo_get_xasl_index_info(), qo_index_scan_new(), qo_is_interesting_order_scan(), qo_search_planner(), qo_set_use_desc(), and qo_top_plan_new().
Definition at line 9899 of file query_planner.c.
References qo_plan::plan_type, qo_plan::plan_un, QO_PLANTYPE_SCAN, QO_SCANMETHOD_INDEX_ORDERBY_SCAN, and qo_plan::scan.
Referenced by qo_check_plan_on_info(), qo_get_xasl_index_info(), qo_index_scan_new(), qo_is_interesting_order_scan(), qo_scan_info(), qo_search_planner(), qo_set_orderby_skip(), qo_set_use_desc(), qo_top_plan_new(), and qo_validate_indexes_for_orderby().
Definition at line 7679 of file query_planner.c.
References qo_plan::plan_type, qo_plan::plan_un, QO_PLANTYPE_SCAN, QO_SCANMETHOD_SEQ_SCAN, and qo_plan::scan.
Referenced by gen_outer(), qo_find_best_nljoin_inner_plan_on_info(), qo_nljoin_cost(), and qo_plan_cmp().
Definition at line 11125 of file query_planner.c.
References NULL, qo_plan::plan_type, qo_plan::plan_un, QO_PLANTYPE_SORT, qo_plan::sort, and SORT_LIMIT.
Referenced by qo_plan_cmp().
|
static |
Definition at line 1821 of file query_planner.c.
References qo_index_entry::all_unique_index_columns_are_equi_terms, assert, bitset_is_empty(), bitset_iterate(), BITSET_MEMBER, bitset_next_member(), BTREE_STATS_PKEYS_NUM, qo_index_entry::col_num, qo_index_entry::constraints, qo_node_index_entry::cum_stats, qo_plan::fixed_cpu_cost, qo_plan::fixed_io_cost, qo_index_entry::force, FUDGE_FACTOR, qo_node_index_entry::head, QO_ATTR_CUM_STATS::height, i, if(), ISCAN_OVERHEAD_FACTOR, QO_ATTR_CUM_STATS::keys, QO_ATTR_CUM_STATS::leafs, qo_node_index_entry::n, qo_index_entry::nsegs, NULL, QO_ATTR_CUM_STATS::pkeys, QO_ATTR_CUM_STATS::pkeys_size, qo_plan::plan_un, prm_get_integer_value(), PRM_ID_PB_NBUFFERS, QO_CPU_WEIGHT, QO_ENV_TERM, qo_is_index_iss_scan(), QO_NODE_ENV, QO_NODE_NCARD, QO_NODE_TCARD, QO_TERM_SEGS, QO_TERM_SELECTIVITY, qo_worst_cost(), qo_zero_cost(), qo_plan::scan, qo_index_entry::seg_equal_terms, qo_index_entry::seg_idxs, SM_IS_CONSTRAINT_UNIQUE_FAMILY, sm_class_constraint::type, qo_plan::variable_cpu_cost, and qo_plan::variable_io_cost.
|
static |
Definition at line 2875 of file query_planner.c.
References bitset_is_empty(), INDENTED_TITLE_FMT, qo_plan::info, qo_plan::join, JOIN_CSELECT, JOIN_INNER, JOIN_LEFT, JOIN_OUTER, JOIN_RIGHT, NO_JOIN, qo_plan::plan_un, QO_JOINMETHOD_IDX_JOIN, qo_plan_fprint(), qo_plan_print_outer_join_terms(), and qo_termset_fprint().
|
static |
Definition at line 2836 of file query_planner.c.
References bitset_delset(), qo_plan::join, and qo_plan::plan_un.
|
static |
Definition at line 2931 of file query_planner.c.
References bitset_is_empty(), bitset_iterate(), bitset_next_member(), i, INDENT_INCR, qo_plan::info, qo_plan::join, JOIN_LEFT, JOIN_RIGHT, qo_plan::plan_un, QO_ENV_TERM, qo_plan_lite_print(), qo_term_string(), and qo_plan::vtbl.
|
static |
Definition at line 2605 of file query_planner.c.
References qo_plan::analytic_eval_list, assert, bitset_assign(), bitset_delset(), bitset_difference(), bitset_first_member(), bitset_init(), bitset_intersects(), bitset_is_equivalent(), bitset_union(), pt_spec_info::derived_table_type, qo_info::env, pt_spec_info::flat_entity_list, qo_plan::has_sort_limit, qo_plan::info, parser_node::info, IS_OUTER_JOIN_TYPE, qo_plan::iscan_sort_list, qo_plan::join, JOIN_CSELECT, qo_plan::multi_range_opt_use, qo_info::nodes, NULL, qo_plan::order, PLAN_MULTI_RANGE_OPT_NO, PLAN_MULTI_RANGE_OPT_USE, qo_plan::plan_type, qo_plan::plan_un, PT_IS_CSELECT, QO_ASSERT, qo_check_join_for_multi_range_opt(), QO_ENV_NODE, QO_ENV_USE_SORT_LIMIT, QO_EQCLASS_SEGS, qo_idx_join_plan_vtbl, QO_JOINMETHOD_IDX_JOIN, QO_JOINMETHOD_MERGE_JOIN, QO_JOINMETHOD_NL_JOIN, qo_merge_join_plan_vtbl, qo_nl_join_plan_vtbl, QO_NODE_ENTITY_SPEC, QO_NODE_IS_CLASS_HIERARCHY, qo_plan_add_ref, qo_plan_compute_cost(), qo_plan_compute_iscan_sort_list(), qo_plan_is_orderby_skip_candidate(), qo_plan_malloc(), QO_PLANTYPE_JOIN, QO_PLANTYPE_SCAN, QO_PLANTYPE_SORT, qo_sort_new(), qo_top_plan_new(), QO_UNORDERED, qo_plan::refcount, qo_plan::sarged_terms, qo_plan::scan, SORT_LIMIT, qo_env::sort_limit_nodes, SORT_TEMP, pt_statement_info::spec, qo_plan::subqueries, qo_plan::top_rooted, VALID_INNER, qo_plan::vtbl, and qo_plan::well_rooted.
Referenced by qo_cp_new(), qo_examine_merge_join(), qo_examine_nl_join(), and qo_generate_join_index_scan().
|
static |
Definition at line 2853 of file query_planner.c.
References qo_plan::join, and qo_plan::plan_un.
|
static |
Definition at line 3158 of file query_planner.c.
References qo_info::cardinality, db_get_bigint(), qo_info::env, qo_plan::fixed_cpu_cost, qo_plan::fixed_io_cost, qo_plan::has_sort_limit, qo_plan::info, qo_plan::join, qo_plan::plan_un, QO_CPU_WEIGHT, QO_ENV_LIMIT_VALUE, QO_INFINITY, qo_worst_cost(), qo_plan::variable_cpu_cost, and qo_plan::variable_io_cost.
|
static |
Definition at line 4244 of file query_planner.c.
References assert, bitset_cardinality(), NO_ERROR, NULL, PLAN_COMP_EQ, PLAN_COMP_GT, PLAN_COMP_LT, PLAN_COMP_UNK, qo_plan::plan_type, qo_plan::plan_un, qo_find_subplan_using_multi_range_opt(), qo_index_covering_plans_cmp(), qo_is_index_mro_scan(), qo_plan_iscan_terms_cmp(), qo_plan_multi_range_opt(), QO_PLANTYPE_JOIN, and qo_plan::scan.
Referenced by qo_plan_cmp().
|
static |
Definition at line 2976 of file query_planner.c.
References bitset_iterate(), bitset_next_member(), db_get_bigint(), qo_info::env, qo_plan::fixed_cpu_cost, qo_plan::fixed_io_cost, i, qo_plan::info, IO_PAGESIZE, qo_plan::join, JOIN_INNER, qo_subquery::node, NONGROUPED_SCAN_COST, NULL, qo_plan::plan_type, qo_plan::plan_un, prm_get_integer_value(), PRM_ID_MAX_OUTER_CARD_OF_IDXJOIN, QO_CPU_WEIGHT, QO_ENV_LIMIT_VALUE, QO_INFINITY, qo_is_iscan(), qo_is_seq_scan(), QO_NODE_TCARD, qo_plan_compute_subquery_cost(), QO_PLANTYPE_SCAN, QO_PLANTYPE_SORT, qo_worst_cost(), qo_plan::scan, qo_plan::sort, SORT_LIMIT, qo_plan::subqueries, qo_env::subqueries, qo_plan::variable_cpu_cost, and qo_plan::variable_io_cost.
Referenced by qo_find_best_nljoin_inner_plan_on_info().
|
static |
Definition at line 9228 of file query_planner.c.
References QO_ASSERT.
Referenced by qo_expr_selectivity().
|
static |
Definition at line 9185 of file query_planner.c.
References QO_ASSERT.
Referenced by qo_expr_selectivity(), and qo_range_selectivity().
|
static |
Definition at line 10489 of file query_planner.c.
References assert, NULL, qo_index_entry::orderby_skip, PLAN_COMP_EQ, PLAN_COMP_GT, PLAN_COMP_LT, PLAN_COMP_UNK, qo_plan::plan_un, qo_is_index_iss_scan(), qo_is_index_loose_scan(), qo_is_interesting_order_scan(), qo_plan_iscan_terms_cmp(), and qo_plan::scan.
Referenced by qo_plan_cmp().
|
static |
Definition at line 4514 of file query_planner.c.
References bitset_delset(), qo_plan::free, free_and_init, qo_plan::info, qo_plan::iscan_sort_list, parser_free_tree(), qo_plan::plan_un, qo_accumulating_plans, QO_ENV_PARSER, qo_plan_free_list, qo_plans_deallocated, qo_plans_demalloced, qo_plan::sarged_terms, and qo_plan::subqueries.
Referenced by qo_find_best_nljoin_inner_plan_on_info(), and qo_plan_free().
|
static |
Definition at line 3573 of file query_planner.c.
References assert, bitset_cardinality(), bitset_first_member(), BTREE_STATS_PKEYS_NUM, qo_index_entry::col_num, qo_node_index_entry::cum_stats, DEFAULT_SELECTIVITY, qo_plan::fixed_cpu_cost, qo_plan::fixed_io_cost, qo_index_entry::groupby_skip, qo_node_index_entry::head, QO_ATTR_CUM_STATS::height, i, qo_plan::info, QO_ATTR_CUM_STATS::keys, QO_ATTR_CUM_STATS::leafs, qo_index_entry::orderby_skip, QO_ATTR_CUM_STATS::pages, QO_ATTR_CUM_STATS::pkeys, QO_ATTR_CUM_STATS::pkeys_size, PLAN_COMP_EQ, PLAN_COMP_GT, PLAN_COMP_LT, PLAN_COMP_UNK, qo_plan::plan_type, qo_plan::plan_un, QO_ENV_TERM, qo_group_by_skip_plans_cmp(), qo_index_covering_plans_cmp(), qo_is_all_unique_index_columns_are_equi_terms(), qo_is_index_covering_scan(), qo_is_index_iss_scan(), qo_is_index_loose_scan(), qo_is_index_mro_scan(), qo_is_interesting_order_scan(), qo_is_seq_scan(), qo_is_sort_limit(), qo_multi_range_opt_plans_cmp(), QO_NODE_IDX, QO_NODE_NCARD, QO_NODE_TCARD, qo_order_by_skip_plans_cmp(), QO_PLAN_CMP_CHECK_COST, qo_plan_cmp_prefer_covering_index(), qo_plan_iscan_terms_cmp(), QO_PLANTYPE_SCAN, QO_PLANTYPE_SORT, QO_TERM_SELECTIVITY, qo_plan::scan, qo_plan::sort, SORT_TEMP, qo_plan::top_rooted, qo_plan::variable_cpu_cost, and qo_plan::variable_io_cost.
Referenced by qo_check_planvec(), qo_cmp_planvec(), and qo_search_partition_join().
|
static |
Definition at line 3519 of file query_planner.c.
References assert, bitset_is_empty(), PLAN_COMP_GT, PLAN_COMP_LT, PLAN_COMP_UNK, qo_plan::plan_type, qo_plan::plan_un, qo_is_index_covering_scan(), qo_is_index_iss_scan(), qo_is_index_loose_scan(), qo_is_interesting_order_scan(), QO_PLANTYPE_SCAN, QO_PLANTYPE_SORT, qo_plan::scan, and qo_plan::sort.
Referenced by qo_plan_cmp().
|
static |
Definition at line 565 of file query_planner.c.
References bitset_iterate(), bitset_next_member(), i, qo_plan::info, qo_subquery::node, NULL, qo_plan_compute_subquery_cost(), qo_plan::subqueries, qo_env::subqueries, qo_plan::variable_cpu_cost, qo_plan::variable_io_cost, and qo_plan::vtbl.
Referenced by qo_follow_new(), qo_index_scan_new(), qo_join_new(), qo_seq_scan_new(), qo_sort_new(), and qo_worst_new().
|
static |
Definition at line 10751 of file query_planner.c.
References pt_expr_info::arg1, pt_expr_info::arg2, pt_sort_spec_info::asc_or_desc, assert, bitset_cardinality(), bitset_iterate(), bitset_next_member(), qo_index_entry::constraints, DB_TYPE_MIDXKEY, pt_sort_spec_info::expr, pt_statement_info::expr, sm_function_info::fi_domain, parser_node::flag, qo_plan::follow, sm_class_constraint::func_index_info, pt_select_info::group_by, qo_node_index_entry::head, i, qo_index_entry::ils_prefix_len, qo_plan::info, parser_node::info, tp_domain::is_desc, qo_plan::join, qo_index_entry::key_type, pt_select_info::list, MSGCAT_SEMANTIC_OUT_OF_MEMORY, MSGCAT_SET_PARSER_SEMANTIC, tp_domain::next, parser_node::next, parser_node::node_type, qo_index_entry::nsegs, NULL, parser, parser_append_node(), parser_new_node(), qo_plan::plan_type, qo_plan::plan_un, pt_sort_spec_info::pos_descr, qfile_tuple_value_position::pos_no, PT_ASC, PT_DESC, PT_DOT_, PT_EQ, PT_ERRORm, pt_get_end_path_node(), PT_IS_CONST, PT_IS_EXPR_NODE_WITH_OPERATOR, PT_NAME, PT_NAME_INFO_CONSTANT, PT_NAME_INFO_IS_FLAGED, pt_point(), PT_SORT_SPEC, pt_to_pos_descr(), pt_to_pos_descr_groupby(), pt_query_info::q, QO_ENTRY_MULTI_COL, QO_ENV_PARSER, QO_ENV_PT_TREE, QO_ENV_SEG, QO_ENV_TERM, qo_is_index_iss_scan(), qo_is_interesting_order_scan(), qo_is_prefix_index(), QO_JOINMETHOD_IDX_JOIN, QO_JOINMETHOD_NL_JOIN, QO_NODE_INFO, QO_NODE_IS_CLASS_HIERARCHY, QO_PLANTYPE_FOLLOW, QO_PLANTYPE_JOIN, QO_PLANTYPE_SCAN, QO_PLANTYPE_SORT, QO_SEG_FUNC_INDEX, QO_SEG_INDEX_TERMS, QO_SEG_PT_NODE, QO_TERM_PT_EXPR, pt_statement_info::query, qo_index_entry::rangelist_seg_idx, qo_plan::scan, qo_index_entry::seg_idxs, pt_query_info::select, tp_domain::setdomain, SM_IS_CONSTRAINT_REVERSE_INDEX_FAMILY, qo_plan::sort, SORT_LIMIT, pt_statement_info::sort_spec, TP_DOMAIN_TYPE, sm_class_constraint::type, and parser_node::with_rollup.
Referenced by qo_index_scan_new(), qo_join_new(), qo_plan_is_orderby_skip_candidate(), and qo_top_plan_new().
|
static |
Definition at line 619 of file query_planner.c.
References pt_union_info::arg1, pt_union_info::arg2, qo_summary::fixed_cpu_cost, qo_summary::fixed_io_cost, if(), parser_node::info, parser_node::node_type, NULL, PT_DIFFERENCE, PT_INTERSECTION, PT_SELECT, PT_UNION, pt_query_info::q, pt_select_info::qo_summary, pt_statement_info::query, pt_query_info::select, pt_query_info::union_, qo_summary::variable_cpu_cost, and qo_summary::variable_io_cost.
Referenced by qo_nljoin_cost(), and qo_plan_compute_cost().
|
static |
Definition at line 4503 of file query_planner.c.
References qo_plan_del_ref.
Referenced by qo_plan_free().
void qo_plan_discard | ( | QO_PLAN * | plan | ) |
Definition at line 4456 of file query_planner.c.
References qo_env::dump_enable, qo_plan::info, qo_env_free(), qo_plan_del_ref, and qo_print_stats().
Referenced by pt_plan_query(), pt_plan_single_table_hq_iterations(), and qo_combine_partitions().
void qo_plan_dump | ( | QO_PLAN * | plan, |
FILE * | output | ||
) |
Definition at line 4621 of file query_planner.c.
References DETAILED_DUMP, NULL, qo_get_optimization_param(), QO_PARAM_LEVEL, qo_plan_fprint(), qo_plan_lite_print(), and SIMPLE_DUMP.
Referenced by pt_plan_query(), and pt_plan_single_table_hq_iterations().
Definition at line 4444 of file query_planner.c.
References qo_plan_add_ref.
Referenced by qo_combine_partitions(), and qo_search_partition().
|
static |
Definition at line 11389 of file query_planner.c.
References qo_plan::follow, qo_node_index_entry::head, qo_plan::plan_un, qo_plan_print_json(), and qo_term_string().
Referenced by qo_plan_print_json().
|
static |
Definition at line 11697 of file query_planner.c.
References qo_plan::follow, qo_plan::plan_un, qo_plan_print_text(), and qo_term_string().
Referenced by qo_plan_print_text().
Definition at line 4385 of file query_planner.c.
References INDENT_FMT, INDENT_INCR, qo_plan_print_analytic_eval(), qo_plan_print_costs(), qo_plan_print_projected_segs(), qo_plan_print_sarged_terms(), qo_plan_print_sort_spec(), qo_plan_print_subqueries(), strlen, TITLE_FMT, and qo_plan::vtbl.
Referenced by qo_dump_planvec(), qo_follow_fprint(), qo_join_fprint(), qo_plan_dump(), and qo_sort_fprint().
|
static |
Definition at line 4543 of file query_planner.c.
References NULL, qo_plan_add_to_free_list(), qo_plan_del_ref_func(), qo_plan_walk(), qo_plan::refcount, and qo_plan::vtbl.
int qo_plan_get_cost_fn | ( | const char * | plan_name | ) |
Definition at line 4661 of file query_planner.c.
References i, intl_mbs_ncasecmp(), qo_node_index_entry::n, qo_worst_cost(), qo_zero_cost(), and strlen.
Referenced by csql_get_sys_param(), and qo_get_optimization_param().
Definition at line 11077 of file query_planner.c.
References assert, cleanup(), qo_info::env, qo_plan::info, parser_node::info, qo_plan::iscan_sort_list, NULL, pt_query_info::order_by, parser, parser_free_tree(), pt_sort_spec_cover(), qo_check_orderby_skip_descending(), QO_ENV_PARSER, QO_ENV_PT_TREE, qo_plan_compute_iscan_sort_list(), and pt_statement_info::query.
Referenced by qo_check_new_best_plan_on_info(), and qo_join_new().
|
static |
Definition at line 10289 of file query_planner.c.
References assert, assert_release, bitset_cardinality(), bitset_is_equivalent(), bitset_subset(), BTREE_STATS_PKEYS_NUM, qo_node_index_entry::cum_stats, qo_node_index_entry::head, NULL, QO_ATTR_CUM_STATS::pages, QO_ATTR_CUM_STATS::pkeys_size, PLAN_COMP_EQ, PLAN_COMP_GT, PLAN_COMP_LT, PLAN_COMP_UNK, qo_plan::plan_un, qo_is_interesting_order_scan(), and qo_plan::scan.
Referenced by qo_group_by_skip_plans_cmp(), qo_index_covering_plans_cmp(), qo_multi_range_opt_plans_cmp(), qo_order_by_skip_plans_cmp(), and qo_plan_cmp().
|
static |
Definition at line 11318 of file query_planner.c.
References bitset_is_empty(), qo_plan::join, JOIN_CSELECT, JOIN_INNER, JOIN_LEFT, JOIN_OUTER, JOIN_RIGHT, NO_JOIN, qo_plan::plan_un, QO_JOINMETHOD_IDX_JOIN, QO_JOINMETHOD_MERGE_JOIN, QO_JOINMETHOD_NL_JOIN, and qo_plan_print_json().
Referenced by qo_plan_print_json().
|
static |
Definition at line 11629 of file query_planner.c.
References bitset_is_empty(), qo_plan::join, JOIN_CSELECT, JOIN_INNER, JOIN_LEFT, JOIN_OUTER, JOIN_RIGHT, NO_JOIN, qo_plan::plan_un, QO_JOINMETHOD_IDX_JOIN, QO_JOINMETHOD_MERGE_JOIN, QO_JOINMETHOD_NL_JOIN, and qo_plan_print_text().
Referenced by qo_plan_print_text().
void qo_plan_lite_print | ( | QO_PLAN * | plan, |
FILE * | f, | ||
int | howfar | ||
) |
Definition at line 4432 of file query_planner.c.
References qo_plan::vtbl.
Referenced by pt_plan_query(), qo_follow_info(), qo_join_info(), qo_plan_dump(), and qo_sort_info().
Definition at line 444 of file query_planner.c.
References ARG_FILE_LINE, bitset_init(), ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), qo_plan::free, qo_plan::has_sort_limit, NULL, qo_plan::plan_un, qo_plan_free_list, qo_plans_allocated, qo_plans_malloced, qo_plan::sarged_terms, qo_plan::subqueries, and qo_plan::use_iscan_descending.
Referenced by qo_find_best_nljoin_inner_plan_on_info(), qo_follow_new(), qo_join_new(), qo_scan_new(), qo_sort_new(), and qo_worst_new().
|
static |
Definition at line 3496 of file query_planner.c.
References BITSET_MEMBER, qo_plan::info, NULL, qo_plan::order, QO_EQCLASS_IDX, qo_sort_new(), QO_UNORDERED, and SORT_TEMP.
Referenced by qo_check_new_best_plan_on_info().
|
static |
Definition at line 1303 of file query_planner.c.
References qo_plan::analytic_eval_list, fcode_get_lowercase_name(), cubxasl::analytic_list_node::function, cubxasl::analytic_eval_type::head, i, INDENTED_TITLE_FMT, cubxasl::analytic_list_node::next, cubxasl::analytic_eval_type::next, sort_list::next, NULL, cubxasl::analytic_eval_type::sort_list, cubxasl::analytic_list_node::sort_list_size, cubxasl::analytic_list_node::sort_prefix_size, and SORT_SPEC_FMT.
Referenced by qo_plan_fprint().
|
static |
Definition at line 1198 of file query_planner.c.
References qo_plan::fixed_cpu_cost, qo_plan::fixed_io_cost, INDENTED_TITLE_FMT, qo_plan::info, qo_plan::variable_cpu_cost, and qo_plan::variable_io_cost.
Referenced by qo_plan_fprint().
|
static |
Definition at line 11408 of file query_planner.c.
References NULL, qo_plan::plan_type, qo_plan_follow_print_json(), qo_plan_join_print_json(), qo_plan_scan_print_json(), qo_plan_sort_print_json(), QO_PLANTYPE_FOLLOW, QO_PLANTYPE_JOIN, QO_PLANTYPE_SCAN, and QO_PLANTYPE_SORT.
Referenced by qo_plan_follow_print_json(), qo_plan_join_print_json(), qo_plan_sort_print_json(), and qo_top_plan_print_json().
|
static |
Definition at line 1262 of file query_planner.c.
References bitset_is_empty(), INDENTED_TITLE_FMT, qo_plan::info, qo_plan::join, qo_plan::plan_un, and qo_termset_fprint().
Referenced by qo_join_fprint().
|
static |
Definition at line 1216 of file query_planner.c.
References bitset_iterate(), bitset_next_member(), INDENTED_TITLE_FMT, qo_plan::info, and qo_seg_fprint().
Referenced by qo_plan_fprint().
|
static |
Definition at line 1245 of file query_planner.c.
References bitset_is_empty(), INDENTED_TITLE_FMT, qo_plan::info, qo_termset_fprint(), and qo_plan::sarged_terms.
Referenced by qo_plan_fprint().
|
static |
Definition at line 1146 of file query_planner.c.
References assert, pt_select_info::group_by, qo_plan::info, parser_node::info, qo_plan::iscan_sort_list, parser_node::node_type, NULL, pt_query_info::order_by, qo_plan::plan_type, qo_plan::plan_un, PT_IS_QUERY, PT_SELECT, pt_query_info::q, QO_ENV_PT_TREE, qo_plan_print_sort_spec_helper(), QO_PLANTYPE_SORT, pt_statement_info::query, pt_query_info::select, qo_plan::sort, SORT_DISTINCT, SORT_GROUPBY, SORT_ORDERBY, qo_plan::top_rooted, and qo_plan::use_iscan_descending.
Referenced by qo_plan_fprint().
|
static |
Definition at line 1095 of file query_planner.c.
References pt_sort_spec_info::asc_or_desc, qfile_tuple_value_position::dom, INDENTED_TITLE_FMT, parser_node::info, lang_get_collation_name(), LANG_SYS_COLLATION, parser_node::next, NULL, pt_sort_spec_info::pos_descr, qfile_tuple_value_position::pos_no, PT_ASC, pt_statement_info::sort_spec, TP_DOMAIN_COLL_LEAVE, TP_DOMAIN_COLLATION, TP_DOMAIN_COLLATION_FLAG, TP_DOMAIN_TYPE, and TP_TYPE_HAS_COLLATION.
Referenced by qo_plan_print_sort_spec().
|
static |
Definition at line 1285 of file query_planner.c.
References bitset_is_empty(), bitset_print(), INDENTED_TITLE_FMT, and qo_plan::subqueries.
Referenced by qo_plan_fprint().
|
static |
Definition at line 11714 of file query_planner.c.
References qo_plan::plan_type, qo_plan_follow_print_text(), qo_plan_join_print_text(), qo_plan_scan_print_text(), qo_plan_sort_print_text(), QO_PLANTYPE_FOLLOW, QO_PLANTYPE_JOIN, QO_PLANTYPE_SCAN, and QO_PLANTYPE_SORT.
Referenced by qo_plan_follow_print_text(), qo_plan_join_print_text(), qo_plan_sort_print_text(), and qo_top_plan_print_text().
|
static |
Definition at line 11177 of file query_planner.c.
References bitset_cardinality(), bitset_iterate(), bitset_next_member(), qo_info::env, i, qo_plan::info, NULL, qo_plan::plan_un, PT_HINT_USE_IDX_DESC, QO_ENV_PT_TREE, QO_ENV_TERM, qo_is_index_covering_scan(), qo_is_index_loose_scan(), QO_NODE_NAME, QO_SCANMETHOD_INDEX_GROUPBY_SCAN, QO_SCANMETHOD_INDEX_ORDERBY_SCAN, QO_SCANMETHOD_INDEX_SCAN, QO_SCANMETHOD_INDEX_SCAN_INSPECT, QO_SCANMETHOD_SEQ_SCAN, qo_term_string(), and qo_plan::scan.
Referenced by qo_plan_print_json().
|
static |
Definition at line 11498 of file query_planner.c.
References bitset_cardinality(), bitset_iterate(), bitset_next_member(), qo_info::env, i, qo_plan::info, NULL, qo_plan::plan_un, PT_HINT_USE_IDX_DESC, QO_ENV_PT_TREE, QO_ENV_TERM, qo_is_index_covering_scan(), qo_is_index_loose_scan(), QO_NODE_NAME, QO_SCANMETHOD_INDEX_GROUPBY_SCAN, QO_SCANMETHOD_INDEX_ORDERBY_SCAN, QO_SCANMETHOD_INDEX_SCAN, QO_SCANMETHOD_INDEX_SCAN_INSPECT, QO_SCANMETHOD_SEQ_SCAN, qo_term_string(), and qo_plan::scan.
Referenced by qo_plan_print_text().
Definition at line 4701 of file query_planner.c.
References qo_plan_vtbl::cost_fn, qo_plan_vtbl::default_cost, i, intl_mbs_ncasecmp(), qo_node_index_entry::n, NULL, qo_plan_vtbl::plan_string, qo_worst_cost(), qo_zero_cost(), and strlen.
Referenced by csql_set_sys_param(), qo_set_cost(), and qo_set_optimization_param().
|
static |
Definition at line 11264 of file query_planner.c.
References assert, NULL, qo_plan::plan_un, qo_plan_print_json(), qo_plan::sort, SORT_DISTINCT, SORT_GROUPBY, SORT_LIMIT, SORT_ORDERBY, and SORT_TEMP.
Referenced by qo_plan_print_json().
|
static |
Definition at line 11579 of file query_planner.c.
References assert, qo_plan::plan_un, qo_plan_print_text(), qo_plan::sort, SORT_DISTINCT, SORT_GROUPBY, SORT_LIMIT, SORT_ORDERBY, and SORT_TEMP.
Referenced by qo_plan_print_text().
|
static |
Definition at line 4491 of file query_planner.c.
References qo_plan::vtbl.
Referenced by qo_plan_free().
void qo_planner_free | ( | QO_PLANNER * | planner | ) |
Definition at line 6360 of file query_planner.c.
References qo_planner::cleanup_needed, qo_planner::cp_info, free_and_init, qo_planner::info_list, qo_planner::join_info, qo_info::next, qo_planner::node_info, qo_clean_planner(), qo_free_info(), qo_plan_del_ref, and qo_planner::worst_plan.
Referenced by qo_env_free().
Definition at line 7451 of file query_planner.c.
References NULL, qo_alloc_planner(), qo_clean_planner(), qo_info_nodes_init(), qo_plans_init(), and qo_search_planner().
Referenced by qo_optimize_helper().
|
static |
Definition at line 4568 of file query_planner.c.
References NULL, qo_accumulating_plans, qo_next_tmpfile, qo_plans_allocated, qo_plans_deallocated, qo_plans_demalloced, and qo_plans_malloced.
Referenced by qo_planner_search().
void qo_plans_stats | ( | FILE * | f | ) |
Definition at line 4607 of file query_planner.c.
References qo_plans_allocated, qo_plans_deallocated, qo_plans_demalloced, and qo_plans_malloced.
Referenced by qo_print_stats().
|
static |
Definition at line 4585 of file query_planner.c.
References qo_plan::free, free_and_init, qo_plan::plan_un, qo_accumulating_plans, qo_plan_free_list, and qo_plans_demalloced.
Referenced by qo_clean_planner().
Definition at line 9536 of file query_planner.c.
References pt_expr_info::arg1, pt_expr_info::arg2, pt_function_info::arg_list, DEFAULT_BETWEEN_SELECTIVITY, DEFAULT_COMP_SELECTIVITY, DEFAULT_EQUAL_SELECTIVITY, DEFAULT_EQUIJOIN_SELECTIVITY, DEFAULT_RANGE_SELECTIVITY, pt_statement_info::expr, pt_statement_info::function, parser_node::info, parser_node::next, parser_node::node_type, pt_expr_info::op, parser_node::or_next, PC_ATTR, PC_MULTI_ATTR, PT_BETWEEN_EQ_NA, PT_BETWEEN_GE_LE, PT_BETWEEN_GE_LT, PT_BETWEEN_GT_LE, PT_BETWEEN_GT_LT, PT_EXPR, PT_EXPR_INFO_FULL_RANGE, PT_EXPR_INFO_IS_FLAGED, pt_is_between_range_op(), QO_ASSERT, qo_classify(), qo_index_cardinality(), and qo_or_selectivity().
Referenced by qo_expr_selectivity().
|
static |
Definition at line 2068 of file query_planner.c.
References bitset_cardinality(), bitset_is_empty(), pt_statement_info::cte, pt_spec_info::cte_pointer, qo_info::env, INDENTED_TITLE_FMT, qo_plan::info, parser_node::info, parser_node::next, pt_pointer_info::node, NULL, parser, parser_print_tree_list(), qo_plan::plan_un, pt_statement_info::pointer, parser_context::print_db_value, PT_HINT_USE_IDX_DESC, pt_print_node_value(), QO_ENV_PARSER, QO_ENV_PT_TREE, qo_is_index_covering_scan(), qo_is_index_iss_scan(), qo_is_index_loose_scan(), qo_is_interesting_order_scan(), qo_node_fprint(), qo_plan_multi_range_opt(), qo_termset_fprint(), pt_cte_info::recursive_part, qo_plan::scan, and pt_statement_info::spec.
|
static |
Definition at line 1423 of file query_planner.c.
References bitset_delset(), qo_plan::plan_un, and qo_plan::scan.
|
static |
Definition at line 2173 of file query_planner.c.
References bitset_cardinality(), bitset_iterate(), bitset_next_member(), qo_info::env, i, qo_plan::info, qo_node_index_entry::n, parser_node::next, NULL, parser, parser_print_tree_list(), qo_plan::plan_un, parser_context::print_db_value, PT_HINT_USE_IDX_DESC, pt_print_node_value(), QO_ENV_PARSER, QO_ENV_PT_TREE, QO_ENV_TERM, qo_is_index_covering_scan(), qo_is_index_iss_scan(), qo_is_index_loose_scan(), qo_is_iscan(), qo_is_iscan_from_orderby(), QO_NODE_INFO, QO_NODE_INFO_N, QO_NODE_NAME, qo_plan_multi_range_opt(), qo_term_string(), qo_plan::scan, and qo_plan::vtbl.
|
static |
Definition at line 1376 of file query_planner.c.
References qo_plan::analytic_eval_list, bitset_assign(), bitset_init(), qo_info::env, qo_plan::info, qo_plan::iscan_sort_list, qo_plan::multi_range_opt_use, NULL, qo_plan::order, PLAN_MULTI_RANGE_OPT_NO, qo_plan::plan_type, qo_plan::plan_un, QO_NODE_SARGS, QO_NODE_SUBQUERIES, qo_plan_malloc(), QO_PLANTYPE_SCAN, QO_UNORDERED, qo_plan::refcount, qo_plan::sarged_terms, qo_plan::scan, qo_plan::subqueries, qo_plan::top_rooted, and qo_plan::well_rooted.
Referenced by qo_index_scan_new(), and qo_seq_scan_new().
|
static |
Definition at line 10236 of file query_planner.c.
References qo_env::bail_out, bitset_add(), bitset_init(), bitset_intersects(), pt_statement_info::expr, parser_node::info, parser_node::node_type, pt_expr_info::op, PT_CONTINUE_WALK, PT_EXPR, PT_IFNULL, PT_IS_NOT_NULL, PT_IS_NULL, PT_NULLSAFE_EQ, PT_STOP_WALK, qo_expr_segs(), and QO_SEG_IDX.
Referenced by qo_validate_index_attr_notnull().
|
static |
Definition at line 8806 of file query_planner.c.
References qo_planner::best_info, bitset_cardinality(), bitset_first_member(), BITSET_MEMBER, bitset_subset(), qo_env::dump_enable, qo_planner::env, i, qo_planner::info_list, qo_planner::N, qo_info::next, qo_planner::node_info, qo_info::nodes, NULL, qo_detach_info(), qo_dump_planner_info(), QO_ENV_NODE, qo_find_best_plan_on_info(), QO_NODE_IDX, QO_PARTITION_NODES, QO_PARTITION_PLAN, qo_plan_finalize(), and qo_search_partition_join().
Referenced by qo_search_planner().
|
static |
Definition at line 8451 of file query_planner.c.
References qo_planner::best_info, bitset_add(), bitset_assign(), bitset_cardinality(), BITSET_CLEAR, bitset_delset(), bitset_difference(), bitset_init(), bitset_is_empty(), bitset_iterate(), BITSET_MEMBER, bitset_next_member(), bitset_remove(), bitset_subset(), bitset_union(), qo_info::cardinality, cmp, pt_spec_info::derived_table, qo_planner::env, pt_select_info::hint, i, parser_node::info, qo_planner::join_info, qo_planner::join_unit, qo_planner::node_info, NULL, PLAN_COMP_GT, PLAN_COMP_LT, planner_permutate(), PT_HINT_ORDERED, pt_query_info::q, QO_ENV_NODE, QO_ENV_PT_TREE, QO_ENV_TERM, qo_find_best_plan_on_info(), QO_INFO_INDEX, QO_IS_EDGE_TERM, qo_is_iscan(), QO_IS_LIMIT_NODE, QO_NODE_DEP_SET, QO_NODE_ENTITY_SPEC, QO_NODE_IDX, QO_NODE_OUTER_DEP_SET, QO_NODE_REL_IDX, QO_NODE_TCARD, QO_PARTITION_M_OFFSET, QO_PARTITION_NODES, qo_plan_cmp(), qo_plan_multi_range_opt(), QO_SEG_HEAD, QO_TC_PATH, QO_TC_TOTALLY_AFTER_JOIN, QO_TERM_CAN_USE_INDEX, QO_TERM_CLASS, QO_TERM_INDEX_SEG, QO_TERM_NODES, QO_UNORDERED, pt_statement_info::query, pt_query_info::select, pt_statement_info::spec, qo_planner::T, qo_planner::term, and qo_info::terms.
Referenced by qo_search_partition().
|
static |
Definition at line 7978 of file query_planner.c.
References qo_planner::all_subqueries, ARG_FILE_LINE, pt_sort_spec_info::asc_or_desc, assert, bitset_add(), bitset_assign(), BITSET_CLEAR, bitset_delset(), bitset_init(), bitset_intersect(), bitset_is_empty(), bitset_iterate(), bitset_next_member(), bitset_remove(), bitset_subset(), bitset_union(), pt_select_info::connect_by, qo_index_entry::constraints, qo_planner::cp_info, qo_info::env, qo_planner::env, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), sm_class_constraint::filter_predicate, parser_node::flag, qo_index_entry::force, pt_select_info::group_by, qo_index_entry::groupby_skip, qo_node_index_entry::head, pt_select_info::hint, i, qo_index_entry::ils_prefix_len, qo_plan::info, parser_node::info, qo_index_entry::is_iss_candidate, qo_planner::join_info, qo_planner::M, qo_env::multi_range_opt_candidate, qo_plan::multi_range_opt_use, qo_node_index_entry::n, qo_planner::N, qo_planner::node, qo_planner::node_info, qo_subquery::nodes, qo_index_entry::nsegs, NULL, pt_query_info::order_by, qo_index_entry::orderby_skip, qo_planner::P, qo_planner::partition, qo_partition::plan, PLAN_MULTI_RANGE_OPT_CAN_USE, qo_plan::plan_type, qo_plan::plan_un, PT_ASC, PT_HINT_USE_IDX_DESC, PT_SPEC_SPECIAL_INDEX_SCAN, qo_env::pt_tree, pt_query_info::q, qo_alloc_info(), qo_check_plan_on_info(), qo_combine_partitions(), QO_ENV_PT_TREE, QO_ENV_USE_SORT_LIMIT, qo_find_best_plan_on_info(), qo_generate_index_scan(), qo_generate_loose_index_scan(), qo_generate_seq_scan(), qo_generate_sort_limit_plan(), qo_index_scan_new(), QO_INFINITY, qo_is_index_mro_scan(), qo_is_interesting_order_scan(), qo_is_iscan_from_groupby(), qo_is_iscan_from_orderby(), qo_is_prefix_index(), QO_JOIN_INFO_SIZE, QO_NI_ENTRY, QO_NI_N, QO_NODE_ENTITY_SPEC, QO_NODE_EQCLASSES, QO_NODE_IDX, QO_NODE_INDEXES, QO_NODE_NCARD, QO_NODE_SARGS, QO_NODE_SELECTIVITY, QO_NODE_SORT_LIMIT_CANDIDATE, QO_NODE_SUBQUERIES, QO_PARTITION_M_OFFSET, qo_plan_add_ref, qo_plan_del_ref, qo_plan_multi_range_opt(), QO_PLANTYPE_SCAN, QO_SCANMETHOD_INDEX_GROUPBY_SCAN, QO_SCANMETHOD_INDEX_ORDERBY_SCAN, QO_SCANMETHOD_INDEX_SCAN, QO_SCANMETHOD_INDEX_SCAN_INSPECT, qo_search_partition(), qo_set_use_desc(), QO_UNORDERED, qo_unset_multi_range_optimization(), qo_validate_index_for_groupby(), qo_validate_index_for_orderby(), qo_walk_plan_tree(), qo_worst_new(), pt_statement_info::query, qo_plan::scan, qo_index_entry::seg_equal_terms, qo_index_entry::seg_other_terms, pt_query_info::select, pt_statement_info::sort_spec, qo_planner::subqueries, qo_subquery::terms, qo_plan::use_iscan_descending, parser_node::with_rollup, qo_planner::worst_info, and qo_planner::worst_plan.
Referenced by qo_planner_search().
Definition at line 1439 of file query_planner.c.
References assert, bitset_is_empty(), NULL, qo_plan::plan_un, qo_plan_compute_cost(), qo_scan_new(), QO_SCANMETHOD_SEQ_SCAN, qo_seq_scan_plan_vtbl, qo_top_plan_new(), qo_plan::scan, and qo_plan::vtbl.
Referenced by qo_generate_seq_scan().
Definition at line 4765 of file query_planner.c.
References ARG_FILE_LINE, db_get_string(), db_make_error(), db_make_string(), DB_TYPE_CHAR, DB_TYPE_NCHAR, DB_TYPE_STRING, DB_VALUE_TYPE, ER_ERROR_SEVERITY, ER_GENERIC_ERROR, er_set(), NULL, and qo_plan_set_cost_fn().
|
static |
Definition at line 812 of file query_planner.c.
References NO_ERROR, qo_plan::plan_un, qo_is_iscan(), qo_is_iscan_from_orderby(), and qo_plan::scan.
Referenced by qo_top_plan_new().
|
static |
Definition at line 732 of file query_planner.c.
References qo_plan::follow, qo_plan::join, qo_plan::plan_type, qo_plan::plan_un, qo_is_iscan(), qo_is_iscan_from_groupby(), qo_is_iscan_from_orderby(), QO_PLANTYPE_FOLLOW, QO_PLANTYPE_JOIN, QO_PLANTYPE_SCAN, and qo_plan::scan.
Referenced by qo_search_planner().
|
static |
Definition at line 2484 of file query_planner.c.
References qo_plan::fixed_cpu_cost, qo_plan::fixed_io_cost, qo_plan::info, IO_PAGESIZE, log3(), qo_plan::order, qo_plan::plan_type, qo_plan::plan_un, prm_get_integer_value(), PRM_ID_SR_NBUFFERS, QO_CPU_WEIGHT, QO_INFINITY, QO_NODE_TCARD, QO_PLANTYPE_SCAN, QO_PLANTYPE_SORT, QO_UNORDERED, qo_worst_cost(), qo_plan::scan, qo_plan::sort, SORT_LIMIT, SORT_TEMP, TEMP_SETUP_COST, qo_plan::variable_cpu_cost, and qo_plan::variable_io_cost.
|
static |
Definition at line 2392 of file query_planner.c.
References INDENTED_TITLE_FMT, qo_plan::info, qo_info::nodes, qo_plan::order, qo_plan::plan_un, qo_eqclass_fprint_wrt(), qo_plan_fprint(), qo_plan::sort, SORT_DISTINCT, SORT_GROUPBY, SORT_LIMIT, SORT_ORDERBY, and SORT_TEMP.
|
static |
Definition at line 2432 of file query_planner.c.
References INDENT_INCR, qo_plan::info, qo_info::nodes, qo_plan::order, qo_plan::plan_un, qo_eqclass_fprint_wrt(), qo_plan_lite_print(), QO_UNORDERED, qo_plan::sort, SORT_DISTINCT, SORT_GROUPBY, SORT_LIMIT, SORT_ORDERBY, SORT_TEMP, and qo_plan::vtbl.
|
static |
Definition at line 2294 of file query_planner.c.
References qo_plan::analytic_eval_list, bitset_is_empty(), qo_plan::has_sort_limit, qo_plan::info, qo_plan::iscan_sort_list, qo_plan::multi_range_opt_use, NULL, qo_plan::order, PLAN_MULTI_RANGE_OPT_NO, qo_plan::plan_type, qo_plan::plan_un, qo_plan_add_ref, qo_plan_compute_cost(), qo_plan_malloc(), QO_PLANTYPE_SORT, qo_sort_plan_vtbl, qo_top_plan_new(), QO_UNORDERED, qo_plan::refcount, qo_plan::sarged_terms, qo_plan::sort, SORT_LIMIT, SORT_TEMP, qo_plan::top_rooted, qo_plan::vtbl, and qo_plan::well_rooted.
Referenced by qo_check_new_best_plan_on_info(), qo_find_best_plan_on_info(), qo_generate_sort_limit_plan(), qo_join_new(), qo_plan_order_by(), and qo_top_plan_new().
|
static |
Definition at line 2378 of file query_planner.c.
References qo_plan::plan_un, and qo_plan::sort.
|
static |
Definition at line 1473 of file query_planner.c.
References qo_plan::fixed_cpu_cost, qo_plan::fixed_io_cost, qo_plan::plan_un, QO_CPU_WEIGHT, QO_NODE_NCARD, QO_NODE_TCARD, qo_plan::scan, qo_plan::variable_cpu_cost, and qo_plan::variable_io_cost.
Definition at line 481 of file query_planner.c.
References assert_release, bitset_iterate(), bitset_next_member(), parser_context::custom_print, i, parser_node::next, NULL, p, parser, parser_print_tree(), parser_context::print_db_value, PT_CONVERT_RANGE, QO_ENV_NODE, QO_ENV_PARSER, QO_NODE_DEP_SET, QO_NODE_NAME, QO_TC_DEP_JOIN, QO_TC_DEP_LINK, QO_TC_DUMMY_JOIN, QO_TERM_CLASS, QO_TERM_ENV, QO_TERM_HEAD, QO_TERM_PT_EXPR, QO_TERM_TAIL, and strlen.
Referenced by qo_follow_info(), qo_join_info(), qo_plan_follow_print_json(), qo_plan_follow_print_text(), qo_plan_scan_print_json(), qo_plan_scan_print_text(), and qo_scan_info().
Definition at line 851 of file query_planner.c.
References pt_query_info::all_distinct, assert, bitset_cardinality(), bitset_iterate(), bitset_next_member(), pt_select_info::connect_by, qo_info::env, parser_node::flag, pt_select_info::group_by, qo_plan::info, parser_node::info, qo_plan::iscan_sort_list, qo_env::Nnodes, NO_ERROR, parser_node::node_type, NULL, pt_query_info::order_by, pt_query_info::orderby_for, parser, parser_free_node(), qo_plan::plan_type, qo_plan::plan_un, PT_DISTINCT, pt_has_analytic(), pt_is_single_tuple(), PT_SELECT, pt_sort_spec_cover(), pt_sort_spec_cover_groupby(), pt_query_info::q, QO_ASSERT, qo_check_groupby_skip_descending(), qo_check_orderby_skip_descending(), QO_ENV_PARSER, QO_ENV_PT_TREE, QO_ENV_TERM, qo_is_interesting_order_scan(), qo_is_iscan_from_groupby(), qo_is_iscan_from_orderby(), qo_plan_compute_iscan_sort_list(), qo_plan_multi_range_opt(), QO_PLANTYPE_JOIN, QO_PLANTYPE_SCAN, qo_set_orderby_skip(), qo_sort_new(), QO_TC_TOTALLY_AFTER_JOIN, QO_TERM_CLASS, QO_UNORDERED, qo_validate_index_for_groupby(), qo_validate_indexes_for_orderby(), qo_walk_plan_tree(), qo_worst_cost(), pt_statement_info::query, qo_plan::sarged_terms, qo_plan::scan, pt_query_info::select, SORT_DISTINCT, SORT_GROUPBY, SORT_ORDERBY, qo_plan::top_rooted, qo_plan::use_iscan_descending, and parser_node::with_rollup.
Referenced by qo_follow_new(), qo_index_scan_new(), qo_join_new(), qo_seq_scan_new(), and qo_sort_new().
void qo_top_plan_print_json | ( | PARSER_CONTEXT * | parser, |
xasl_node * | xasl, | ||
PT_NODE * | select, | ||
QO_PLAN * | plan | ||
) |
Definition at line 11446 of file query_planner.c.
References assert, parser_context::custom_print, pt_plan_trace_info::format, pt_select_info::group_by, indx_info::groupby_skip, access_spec_node::indexptr, parser_node::info, pt_plan_trace_info::json_plan, MAX_NUM_PLAN_TRACE, NULL, parser_context::num_plan_trace, pt_query_info::order_by, indx_info::orderby_skip, parser_print_tree(), parser_context::plan_trace, PT_CONVERT_RANGE, pt_query_info::q, qo_plan_print_json(), pt_statement_info::query, QUERY_TRACE_JSON, pt_query_info::select, xasl_node::spec_list, and pt_plan_trace_info::trace.
Referenced by pt_plan_query().
void qo_top_plan_print_text | ( | PARSER_CONTEXT * | parser, |
xasl_node * | xasl, | ||
PT_NODE * | select, | ||
QO_PLAN * | plan | ||
) |
Definition at line 11748 of file query_planner.c.
References assert, parser_context::custom_print, pt_plan_trace_info::format, pt_select_info::group_by, indx_info::groupby_skip, access_spec_node::indexptr, parser_node::info, MAX_NUM_PLAN_TRACE, NULL, parser_context::num_plan_trace, pt_query_info::order_by, indx_info::orderby_skip, parser_print_tree(), parser_context::plan_trace, port_close_memstream(), port_open_memstream(), PT_CONVERT_RANGE, pt_query_info::q, qo_plan_print_text(), pt_statement_info::query, QUERY_TRACE_TEXT, pt_query_info::select, xasl_node::spec_list, pt_plan_trace_info::text_plan, and pt_plan_trace_info::trace.
Referenced by pt_plan_query().
|
static |
Definition at line 4836 of file query_planner.c.
References i, qo_planvec::nplans, qo_planvec::overflow, qo_planvec::plan, and qo_plan_del_ref.
Referenced by qo_detach_info().
|
static |
Definition at line 768 of file query_planner.c.
References qo_info::env, qo_index_entry::groupby_skip, pt_select_info::hint, qo_plan::info, parser_node::info, qo_plan::multi_range_opt_use, NO_ERROR, qo_index_entry::orderby_skip, PLAN_MULTI_RANGE_OPT_NO, qo_plan::plan_un, PT_HINT_USE_IDX_DESC, qo_env::pt_tree, pt_query_info::q, qo_is_index_mro_scan(), pt_statement_info::query, qo_plan::scan, pt_query_info::select, and qo_index_entry::use_descending.
Referenced by qo_search_planner().
|
static |
Definition at line 9986 of file query_planner.c.
References assert, sm_class::att_count, sm_class::attributes, qo_env::bail_out, bitset_add(), BITSET_CLEAR, bitset_delset(), bitset_init(), bitset_intersects(), qo_index_entry::class_, qo_index_entry::col_num, sm_attribute::flags, sm_attribute::header, i, intl_identifier_casecmp(), lookup_node(), lookup_seg(), sm_component::name, parser_node::node_type, qo_env::nterms, NULL, parser_node::or_next, qo_env::parser, parser_walk_tree(), pt_get_name(), PT_NAME, QO_ENV_PT_TREE, QO_ENV_TERM, qo_expr_segs(), qo_search_isnull_key_expr(), QO_SEG_IDX, QO_SEG_NAME, QO_TERM_PT_EXPR, qo_index_entry::seg_idxs, SM_ATTFLAG_NON_NULL, and qo_class_info_entry::smclass.
Referenced by qo_validate_index_for_groupby(), and qo_validate_index_for_orderby().
|
static |
Definition at line 10625 of file query_planner.c.
References assert, qo_index_entry::class_, qo_node_index_entry::head, NULL, QO_ENV_PT_TREE, qo_validate_index_attr_notnull(), and qo_validate_index_term_notnull().
Referenced by qo_search_planner(), and qo_top_plan_new().
|
static |
Definition at line 10149 of file query_planner.c.
References pt_expr_info::arg1, assert, qo_index_entry::class_, pt_statement_info::expr, qo_node_index_entry::head, parser_node::info, parser_node::next, parser_node::node_type, NULL, pt_expr_info::op, PT_CAST, PT_EXPR, pt_get_end_path_node(), QO_ENV_PT_TREE, qo_validate_index_attr_notnull(), and qo_validate_index_term_notnull().
Referenced by qo_search_planner(), and qo_validate_indexes_for_orderby().
|
static |
Definition at line 9914 of file query_planner.c.
References pt_expr_info::arg1, assert, BITSET_MEMBER, qo_index_entry::class_, pt_statement_info::expr, parser_node::info, intl_identifier_casecmp(), node_name, parser_node::node_type, qo_env::nterms, NULL, pt_expr_info::op, parser_node::or_next, PT_EXPR, pt_get_name(), PT_IS_NOT_NULL, PT_NAME, QO_ENV_SEG, QO_ENV_TERM, QO_ON_COND_TERM, QO_SEG_NAME, QO_TERM_PT_EXPR, QO_TERM_SEGS, and qo_index_entry::seg_idxs.
Referenced by qo_validate_index_for_groupby(), and qo_validate_index_for_orderby().
|
static |
Definition at line 832 of file query_planner.c.
References qo_info::env, ER_FAILED, qo_plan::info, NO_ERROR, qo_plan::plan_un, qo_is_iscan_from_orderby(), qo_validate_index_for_orderby(), and qo_plan::scan.
Referenced by qo_top_plan_new().
|
static |
Definition at line 689 of file query_planner.c.
References ER_FAILED, qo_plan::follow, qo_plan::join, NO_ERROR, qo_plan::plan_type, qo_plan::plan_un, QO_PLANTYPE_FOLLOW, QO_PLANTYPE_JOIN, QO_PLANTYPE_SCAN, QO_PLANTYPE_SORT, and qo_plan::sort.
Referenced by qo_search_planner(), and qo_top_plan_new().
|
static |
Definition at line 3464 of file query_planner.c.
References qo_plan::fixed_cpu_cost, qo_plan::fixed_io_cost, QO_INFINITY, qo_plan::use_iscan_descending, qo_plan::variable_cpu_cost, and qo_plan::variable_io_cost.
Referenced by qo_follow_cost(), qo_iscan_cost(), qo_mjoin_cost(), qo_nljoin_cost(), qo_plan_get_cost_fn(), qo_plan_set_cost_fn(), qo_sort_cost(), and qo_top_plan_new().
|
static |
Definition at line 3441 of file query_planner.c.
|
static |
Definition at line 3453 of file query_planner.c.
References qo_plan::vtbl.
Definition at line 3406 of file query_planner.c.
References qo_plan::analytic_eval_list, qo_plan::info, qo_plan::iscan_sort_list, qo_plan::multi_range_opt_use, NULL, qo_plan::order, PLAN_MULTI_RANGE_OPT_NO, qo_plan::plan_type, qo_plan_compute_cost(), qo_plan_malloc(), QO_PLANTYPE_WORST, QO_UNORDERED, qo_worst_plan_vtbl, qo_plan::refcount, qo_plan::top_rooted, qo_plan::vtbl, and qo_plan::well_rooted.
Referenced by qo_search_planner().
|
static |
Definition at line 3480 of file query_planner.c.
References qo_plan::fixed_cpu_cost, qo_plan::fixed_io_cost, qo_plan::variable_cpu_cost, and qo_plan::variable_io_cost.
Referenced by qo_iscan_cost(), qo_plan_get_cost_fn(), and qo_plan_set_cost_fn().
|
static |
Definition at line 8878 of file query_planner.c.
References bitset_intersects(), i, qo_planner::P, qo_planner::partition, QO_PARTITION_DEPENDENCIES, and QO_PARTITION_NODES.
Referenced by qo_combine_partitions().
QO_PLAN_VTBL* all_vtbls[] |
Definition at line 358 of file query_planner.c.
|
static |
Definition at line 94 of file query_planner.c.
Referenced by qo_alloc_info(), qo_info_nodes_init(), and qo_info_stats().
|
static |
Definition at line 95 of file query_planner.c.
Referenced by qo_free_info(), qo_info_nodes_init(), and qo_info_stats().
|
static |
Definition at line 101 of file query_planner.c.
Referenced by qo_plan_add_to_free_list(), qo_plans_init(), and qo_plans_teardown().
|
static |
Definition at line 325 of file query_planner.c.
Referenced by qo_follow_new().
|
static |
Definition at line 303 of file query_planner.c.
Referenced by qo_join_new().
|
static |
Definition at line 270 of file query_planner.c.
Referenced by qo_index_scan_new().
|
static |
Definition at line 314 of file query_planner.c.
Referenced by qo_join_new().
|
static |
Definition at line 102 of file query_planner.c.
Referenced by qo_plans_init().
|
static |
Definition at line 292 of file query_planner.c.
Referenced by qo_join_new().
|
static |
Definition at line 104 of file query_planner.c.
Referenced by qo_plan_add_to_free_list(), qo_plan_malloc(), and qo_plans_teardown().
|
static |
Definition at line 97 of file query_planner.c.
Referenced by qo_plan_malloc(), qo_plans_init(), and qo_plans_stats().
|
static |
Definition at line 98 of file query_planner.c.
Referenced by qo_plan_add_to_free_list(), qo_plans_init(), and qo_plans_stats().
|
static |
Definition at line 100 of file query_planner.c.
Referenced by qo_plan_add_to_free_list(), qo_plans_init(), qo_plans_stats(), and qo_plans_teardown().
|
static |
Definition at line 99 of file query_planner.c.
Referenced by qo_plan_malloc(), qo_plans_init(), and qo_plans_stats().
|
static |
Definition at line 259 of file query_planner.c.
Referenced by qo_seq_scan_new().
|
static |
Definition at line 336 of file query_planner.c.
|
static |
Definition at line 281 of file query_planner.c.
Referenced by qo_sort_new().
|
static |
Definition at line 347 of file query_planner.c.
Referenced by qo_worst_new().