Disable dynamic sampling for external table
This commit is contained in:
parent
18474fd7c5
commit
098ebfbf83
@ -1284,6 +1284,8 @@ int ObDynamicSamplingUtils::get_ds_table_param(ObOptimizerContext &ctx,
|
||||
//do nothing
|
||||
} else if (is_virtual_table(table_meta->get_ref_table_id()) && !is_ds_virtual_table(table_meta->get_ref_table_id())) {
|
||||
//do nothing
|
||||
} else if (table_meta->get_table_type() == EXTERNAL_TABLE) {
|
||||
//do nothing TODO [EXTERNAL TABLE]
|
||||
} else if (OB_FAIL(get_valid_dynamic_sampling_level(ctx.get_session_info(),
|
||||
log_plan->get_log_plan_hint().get_dynamic_sampling_hint(table_meta->get_table_id()),
|
||||
ctx.get_global_hint().get_dynamic_sampling(),
|
||||
|
@ -11905,6 +11905,7 @@ int ObJoinOrder::init_est_sel_info_for_access_path(const uint64_t table_id,
|
||||
get_plan()->get_selectivity_ctx(),
|
||||
table_id,
|
||||
ref_table_id,
|
||||
table_schema.get_table_type(),
|
||||
table_meta_info_.table_row_count_,
|
||||
all_used_part_id,
|
||||
all_used_tablet_id,
|
||||
|
@ -88,6 +88,7 @@ int OptTableMeta::assign(const OptTableMeta &other)
|
||||
|
||||
int OptTableMeta::init(const uint64_t table_id,
|
||||
const uint64_t ref_table_id,
|
||||
const ObTableType table_type,
|
||||
const int64_t rows,
|
||||
const OptTableStatType stat_type,
|
||||
ObSqlSchemaGuard &schema_guard,
|
||||
@ -247,6 +248,7 @@ int OptTableMetas::copy_table_meta_info(const OptTableMetas &table_metas, const
|
||||
int OptTableMetas::add_base_table_meta_info(OptSelectivityCtx &ctx,
|
||||
const uint64_t table_id,
|
||||
const uint64_t ref_table_id,
|
||||
const ObTableType table_type,
|
||||
const int64_t rows,
|
||||
ObIArray<int64_t> &all_used_part_id,
|
||||
ObIArray<ObTabletID> &all_used_tablets,
|
||||
@ -265,7 +267,7 @@ int OptTableMetas::add_base_table_meta_info(OptSelectivityCtx &ctx,
|
||||
} else if (OB_ISNULL(table_meta = table_metas_.alloc_place_holder())) {
|
||||
ret = OB_ALLOCATE_MEMORY_FAILED;
|
||||
LOG_WARN("failed to allocate place holder for table meta", K(ret));
|
||||
} else if (OB_FAIL(table_meta->init(table_id, ref_table_id, rows, stat_type,
|
||||
} else if (OB_FAIL(table_meta->init(table_id, ref_table_id, table_type, rows, stat_type,
|
||||
*schema_guard, all_used_part_id, all_used_tablets,
|
||||
column_ids, all_used_global_parts, scale_ratio, ctx))) {
|
||||
LOG_WARN("failed to init new tstat", K(ret));
|
||||
|
@ -219,6 +219,7 @@ public:
|
||||
OptTableMeta() :
|
||||
table_id_(OB_INVALID_ID),
|
||||
ref_table_id_(OB_INVALID_ID),
|
||||
table_type_(share::schema::MAX_TABLE_TYPE),
|
||||
rows_(0),
|
||||
stat_type_(OptTableStatType::DEFAULT_TABLE_STAT),
|
||||
last_analyzed_(0),
|
||||
@ -234,6 +235,7 @@ public:
|
||||
|
||||
int init(const uint64_t table_id,
|
||||
const uint64_t ref_table_id,
|
||||
const share::schema::ObTableType table_type,
|
||||
const int64_t rows,
|
||||
const OptTableStatType stat_type,
|
||||
ObSqlSchemaGuard &schema_guard,
|
||||
@ -282,12 +284,15 @@ public:
|
||||
bool use_ds_stat() const { return stat_type_ == OptTableStatType::DS_TABLE_STAT; }
|
||||
void set_use_ds_stat() { stat_type_ = OptTableStatType::DS_TABLE_STAT; }
|
||||
|
||||
TO_STRING_KV(K_(table_id), K_(ref_table_id), K_(rows), K_(stat_type), K_(ds_level),
|
||||
share::schema::ObTableType get_table_type() const { return table_type_; }
|
||||
|
||||
TO_STRING_KV(K_(table_id), K_(ref_table_id), K_(table_type), K_(rows), K_(stat_type), K_(ds_level),
|
||||
K_(all_used_parts), K_(all_used_tablets), K_(pk_ids), K_(column_metas),
|
||||
K_(all_used_global_parts), K_(scale_ratio));
|
||||
private:
|
||||
uint64_t table_id_;
|
||||
uint64_t ref_table_id_;
|
||||
const share::schema::ObTableType table_type_;
|
||||
double rows_;
|
||||
OptTableStatType stat_type_;
|
||||
int64_t last_analyzed_;
|
||||
@ -321,6 +326,7 @@ public:
|
||||
int add_base_table_meta_info(OptSelectivityCtx &ctx,
|
||||
const uint64_t table_id,
|
||||
const uint64_t ref_table_id,
|
||||
const share::schema::ObTableType table_type,
|
||||
const int64_t rows,
|
||||
common::ObIArray<int64_t> &all_used_part_id,
|
||||
common::ObIArray<ObTabletID> &all_used_tablets,
|
||||
|
Loading…
x
Reference in New Issue
Block a user