CUBRID Engine
latest
|
Go to the source code of this file.
Classes | |
struct | qo_plan_vtbl |
struct | qo_plan |
struct | qo_planvec |
struct | qo_info |
struct | qo_planner |
Namespaces | |
cubxasl | |
Macros | |
#define | QO_CPU_WEIGHT 0.0025 |
#define | qo_plan_add_ref(p) ((p->refcount)++, (p)) |
#define | qo_plan_del_ref(p) |
#define | qo_plan_release(p) |
#define | NPLANS 4 /* Maximum number of plans to keep in a PlanVec */ |
Typedefs | |
typedef struct qo_plan_vtbl | QO_PLAN_VTBL |
typedef struct qo_planvec | QO_PLANVEC |
Enumerations | |
enum | QO_PLANTYPE { QO_PLANTYPE_SCAN, QO_PLANTYPE_SORT, QO_PLANTYPE_JOIN, QO_PLANTYPE_FOLLOW, QO_PLANTYPE_WORST } |
enum | QO_SCANMETHOD { QO_SCANMETHOD_SEQ_SCAN, QO_SCANMETHOD_INDEX_SCAN, QO_SCANMETHOD_INDEX_ORDERBY_SCAN, QO_SCANMETHOD_INDEX_GROUPBY_SCAN, QO_SCANMETHOD_INDEX_SCAN_INSPECT } |
enum | QO_JOINMETHOD { QO_JOINMETHOD_NL_JOIN, QO_JOINMETHOD_IDX_JOIN, QO_JOINMETHOD_MERGE_JOIN } |
enum | QO_PLAN_COMPARE_RESULT { PLAN_COMP_UNK = -2, PLAN_COMP_LT = -1, PLAN_COMP_EQ = 0, PLAN_COMP_GT = 1 } |
enum | QO_PLAN_ULTI_RANGE_OPT_USE { PLAN_MULTI_RANGE_OPT_USE = 1, PLAN_MULTI_RANGE_OPT_NO = 0, PLAN_MULTI_RANGE_OPT_CANNOT_USE = -1, PLAN_MULTI_RANGE_OPT_CAN_USE = -2 } |
Functions | |
QO_PLAN * | qo_planner_search (QO_ENV *) |
void | qo_planner_free (QO_PLANNER *) |
void | qo_plans_stats (FILE *) |
void | qo_info_stats (FILE *) |
bool | qo_is_seq_scan (QO_PLAN *) |
bool | qo_is_iscan (QO_PLAN *) |
bool | qo_is_iscan_from_groupby (QO_PLAN *) |
bool | qo_is_iscan_from_orderby (QO_PLAN *) |
bool | qo_is_interesting_order_scan (QO_PLAN *) |
bool | qo_is_all_unique_index_columns_are_equi_terms (QO_PLAN *plan) |
bool | qo_has_sort_limit_subplan (QO_PLAN *plan) |
#define NPLANS 4 /* Maximum number of plans to keep in a PlanVec */ |
Definition at line 220 of file query_planner.h.
Referenced by qo_check_planvec(), and qo_init_planvec().
#define QO_CPU_WEIGHT 0.0025 |
Definition at line 43 of file query_planner.h.
Referenced by qo_follow_cost(), qo_iscan_cost(), qo_mjoin_cost(), qo_nljoin_cost(), qo_sort_cost(), and qo_sscan_cost().
Definition at line 208 of file query_planner.h.
Referenced by qo_check_planvec(), qo_follow_new(), qo_join_new(), qo_plan_finalize(), qo_search_planner(), and qo_sort_new().
#define qo_plan_del_ref | ( | p | ) |
Definition at line 209 of file query_planner.h.
Referenced by qo_check_planvec(), qo_partition_free(), qo_plan_del_ref_func(), qo_plan_discard(), qo_planner_free(), qo_search_planner(), and qo_uninit_planvec().
#define qo_plan_release | ( | p | ) |
Definition at line 214 of file query_planner.h.
Referenced by qo_check_new_best_plan_on_info(), qo_check_plan_on_info(), and qo_index_scan_new().
typedef struct qo_plan_vtbl QO_PLAN_VTBL |
Definition at line 70 of file query_planner.h.
typedef struct qo_planvec QO_PLANVEC |
Definition at line 222 of file query_planner.h.
enum QO_JOINMETHOD |
Enumerator | |
---|---|
QO_JOINMETHOD_NL_JOIN | |
QO_JOINMETHOD_IDX_JOIN | |
QO_JOINMETHOD_MERGE_JOIN |
Definition at line 63 of file query_planner.h.
Enumerator | |
---|---|
PLAN_COMP_UNK | |
PLAN_COMP_LT | |
PLAN_COMP_EQ | |
PLAN_COMP_GT |
Definition at line 83 of file query_planner.h.
Enumerator | |
---|---|
PLAN_MULTI_RANGE_OPT_USE | |
PLAN_MULTI_RANGE_OPT_NO | |
PLAN_MULTI_RANGE_OPT_CANNOT_USE | |
PLAN_MULTI_RANGE_OPT_CAN_USE |
Definition at line 91 of file query_planner.h.
enum QO_PLANTYPE |
Enumerator | |
---|---|
QO_PLANTYPE_SCAN | |
QO_PLANTYPE_SORT | |
QO_PLANTYPE_JOIN | |
QO_PLANTYPE_FOLLOW | |
QO_PLANTYPE_WORST |
Definition at line 45 of file query_planner.h.
enum QO_SCANMETHOD |
Enumerator | |
---|---|
QO_SCANMETHOD_SEQ_SCAN | |
QO_SCANMETHOD_INDEX_SCAN | |
QO_SCANMETHOD_INDEX_ORDERBY_SCAN | |
QO_SCANMETHOD_INDEX_GROUPBY_SCAN | |
QO_SCANMETHOD_INDEX_SCAN_INSPECT |
Definition at line 54 of file query_planner.h.
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().
void qo_info_stats | ( | FILE * | ) |
Definition at line 6286 of file query_planner.c.
References infos_allocated, and infos_deallocated.
Referenced by qo_print_stats().
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().
void qo_planner_free | ( | QO_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().
void qo_plans_stats | ( | FILE * | ) |
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().