[FEAT MERGE]adaptive cost model

This commit is contained in:
zzg19950727
2024-02-07 11:01:37 +00:00
committed by ob-robot
parent 1ee1ad37e4
commit 9a22f3ea88
85 changed files with 21899 additions and 18832 deletions

View File

@ -160,7 +160,8 @@ namespace sql
force_no_mat_(false),
prune_mj_(true),
force_inner_nl_(false),
ignore_hint_(true) { }
ignore_hint_(true),
is_reverse_path_(false) { }
virtual ~ValidPathInfo() {};
void reset()
{
@ -173,6 +174,7 @@ namespace sql
prune_mj_ = true;
force_inner_nl_ = false;
ignore_hint_ = true;
is_reverse_path_ = false;
}
TO_STRING_KV(K_(join_type),
K_(local_methods),
@ -182,7 +184,8 @@ namespace sql
K_(force_no_mat),
K_(prune_mj),
K_(force_inner_nl),
K_(ignore_hint));
K_(ignore_hint),
K_(is_reverse_path));
ObJoinType join_type_;
int64_t local_methods_;
int64_t distributed_methods_;
@ -192,6 +195,7 @@ namespace sql
bool prune_mj_; // prune merge join path
bool force_inner_nl_;
bool ignore_hint_;
bool is_reverse_path_;
};
enum OptimizationMethod
@ -652,7 +656,7 @@ struct EstimateCostInfo {
static int re_estimate_cost(const EstimateCostInfo &param,
ObCostTableScanInfo &est_cost_info,
const SampleInfo &sample_info,
const ObOptEstCost::MODEL_TYPE model_type,
const ObOptimizerContext &opt_ctx,
double &card,
double &cost);
int check_adj_index_cost_valid(double &stats_phy_query_range_row_count,
@ -2250,6 +2254,7 @@ struct NullAwareAntiJoinInfo {
const ObJoinType join_type,
const ObIArray<ObRawExpr*> &join_conditions,
const bool ignore_hint,
const bool reverse_join_tree,
ValidPathInfo &path_info);
int get_valid_path_info_from_hint(const ObRelIds &table_set,
bool both_access,