support dynamic sampling for materialized view

This commit is contained in:
chimyue 2024-10-12 06:35:17 +00:00 committed by ob-robot
parent f3fab50e97
commit 8b6d8ee30f
2 changed files with 2 additions and 5 deletions

View File

@ -191,11 +191,6 @@ int ObAccessPathEstimation::get_valid_est_methods(ObOptimizerContext &ctx,
valid_methods &= ~EST_STORAGE;
valid_methods &= ~EST_DS_METHODS;
}
if (table_type == MATERIALIZED_VIEW) {
// TODO [MATERIALIZED TABLE]
valid_methods &= ~EST_STORAGE;
valid_methods &= ~EST_DS_METHODS;
}
if (is_virtual_table(ref_table_id)) {
if (!ObDynamicSamplingUtils::is_ds_virtual_table(ref_table_id)) {
valid_methods &= ~EST_DS_METHODS;

View File

@ -673,6 +673,8 @@ int ObDynamicSampling::add_basic_hint_info(ObSqlString &basic_hint_str,
//Dynamic Sampling SQL shouldn't dynamic sampling
} else if (OB_FAIL(basic_hint_str.append(" DYNAMIC_SAMPLING(0) "))) {
LOG_WARN("failed to append", K(ret));
} else if (OB_FAIL(basic_hint_str.append(" DBMS_STATS "))) {
LOG_WARN("failed to append", K(ret));
//add query timeout control Dynamic Sampling SQL execute time.
} else if (OB_FAIL(basic_hint_str.append_fmt(" QUERY_TIMEOUT(%ld) ", query_timeout))) {
LOG_WARN("failed to append", K(ret));