diff --git a/src/share/stat/ob_dbms_stats_maintenance_window.cpp b/src/share/stat/ob_dbms_stats_maintenance_window.cpp index 2f446f1024..2d26e9a448 100644 --- a/src/share/stat/ob_dbms_stats_maintenance_window.cpp +++ b/src/share/stat/ob_dbms_stats_maintenance_window.cpp @@ -399,13 +399,20 @@ int ObDbmsStatsMaintenanceWindow::is_stats_maintenance_window_attr(const sql::Ob ObObj time_obj; ObObj src_obj; int64_t current_time = ObTimeUtility::current_time(); - ObArenaAllocator calc_buf(ObModIds::OB_SQL_PARSER); + ObArenaAllocator calc_buf("DbmsStatsWindow"); ObCastCtx cast_ctx(&calc_buf, NULL, CM_NONE, ObCharset::get_system_collation()); cast_ctx.dtc_params_ = session->get_dtc_params(); int64_t specify_time = -1; - int32_t offset = 0; + int32_t offset_sec = 0; src_obj.set_string(ObVarcharType, val_name); - if (lib::is_oracle_mode()) { + const ObTimeZoneInfo* tz_info = get_timezone_info(session); + if (NULL != tz_info) { + if (OB_FAIL(tz_info->get_timezone_offset(ObTimeUtility::current_time(), offset_sec))) { + LOG_WARN("failed to get timezone offset", K(ret)); + } + } + if (OB_FAIL(ret)) { + } else if (lib::is_oracle_mode()) { if (OB_FAIL(ObObjCaster::to_type(ObTimestampTZType, cast_ctx, src_obj, time_obj))) { LOG_WARN("failed to ObTimestampTZType type", K(ret)); } else { @@ -415,21 +422,13 @@ int ObDbmsStatsMaintenanceWindow::is_stats_maintenance_window_attr(const sql::Ob if (OB_FAIL(ObObjCaster::to_type(ObDateTimeType, cast_ctx, src_obj, time_obj))) { LOG_WARN("failed to ObTimestampType type", K(ret)); } else { - specify_time = time_obj.get_datetime(); - const ObTimeZoneInfo* tz_info = get_timezone_info(session); - if (NULL != tz_info) { - if (OB_FAIL(tz_info->get_timezone_offset(USEC_TO_SEC(specify_time), offset))) { - LOG_WARN("failed to get offset between utc and local", K(ret)); - } else { - specify_time -= SEC_TO_USEC(offset); - } - } + specify_time = time_obj.get_datetime() - SEC_TO_USEC(offset_sec); } } if (OB_SUCC(ret)) { bool is_valid = false; - if (OB_FAIL(check_date_validate(job_name, specify_time + SEC_TO_USEC(offset), - current_time + SEC_TO_USEC(offset), is_valid))) { + if (OB_FAIL(check_date_validate(job_name, specify_time + SEC_TO_USEC(offset_sec), + current_time + SEC_TO_USEC(offset_sec), is_valid))) { LOG_WARN("failed to check date valid", K(ret)); } else if (!is_valid) { ret = OB_ERR_DBMS_STATS_PL; @@ -551,6 +550,8 @@ int ObDbmsStatsMaintenanceWindow::check_date_validate(const ObString &job_name, LOG_WARN("get unexpected error", K(ret), K(specify_time)); } else if (current_time > specify_time) { is_valid = false; + } else if (0 == job_name.case_compare(opt_stats_history_manager)) { + is_valid = true; } else if (OB_FAIL(ObTimeConverter::usec_to_ob_time(specify_time, ob_time))) { LOG_WARN("failed to usec to ob time", K(ret), K(specify_time)); } else if (OB_UNLIKELY(ob_time.parts_[DT_WDAY] < 1 || diff --git a/src/sql/optimizer/ob_dynamic_sampling.cpp b/src/sql/optimizer/ob_dynamic_sampling.cpp index 5228d00b5f..2aa53b703f 100644 --- a/src/sql/optimizer/ob_dynamic_sampling.cpp +++ b/src/sql/optimizer/ob_dynamic_sampling.cpp @@ -1378,6 +1378,15 @@ int ObDynamicSamplingUtils::check_ds_can_use_filter(const ObRawExpr *filter, real_expr->get_expr_type() == T_OP_BOOL) { no_use = true; } else {/*do nothing*/} + } else if (filter->is_column_ref_expr()) { + //Dynamic Sampling of columns with LOB-related types is prohibited, as projecting such type columns is particularly slow. + //bug: + if (!ObColumnStatParam::is_valid_opt_col_type(filter->get_data_type())) { + no_use = true; + } else if (ob_obj_type_class(filter->get_data_type()) == ColumnTypeClass::ObTextTC && + filter->get_data_type() != ObTinyTextType) { + no_use = true; + } } else {/*do nothing*/} if (OB_SUCC(ret) && !no_use) { ++ total_expr_cnt; diff --git a/tools/deploy/mysql_test/test_suite/geometry/r/mysql/geometry_bugfix_mysql.result b/tools/deploy/mysql_test/test_suite/geometry/r/mysql/geometry_bugfix_mysql.result index ec6aaef568..154c2e8e37 100644 --- a/tools/deploy/mysql_test/test_suite/geometry/r/mysql/geometry_bugfix_mysql.result +++ b/tools/deploy/mysql_test/test_suite/geometry/r/mysql/geometry_bugfix_mysql.result @@ -427,12 +427,12 @@ INSERT INTO t1 (g) VALUES (ST_GeomFromText('POINT(6 6)', 3294)), (ST_GeomFromText('POINT(7 7)', 3294)), (ST_GeomFromText('LINESTRING(0 0, 3 3)',3294)); -explain select st_astext(a.g), st_astext(b.g) from t1 a join t1 b where _st_covers(a.g, b.g); +explain select /*+dynamic_sampling(1)*/st_astext(a.g), st_astext(b.g) from t1 a join t1 b where _st_covers(a.g, b.g); Query Plan =============================================================== |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| --------------------------------------------------------------- -|0 |NESTED-LOOP JOIN | |27 |345 | +|0 |NESTED-LOOP JOIN | |21 |345 | |1 |├─TABLE FULL SCAN |a |9 |3 | |2 |└─DISTRIBUTED TABLE FULL SCAN|b(idx)|3 |38 | =============================================================== @@ -448,12 +448,12 @@ Outputs & filters: access([b.__pk_increment], [b.g]), partitions(p0) is_index_back=true, is_global_index=false, filter_before_indexback[false], range_key([b.__cellid_16], [b.__mbr_16], [b.__pk_increment]), range(MIN ; MAX) -explain select st_astext(a.g), st_astext(b.g) from t1 a join t1 b where st_contains(a.g, b.g); +explain select /*+dynamic_sampling(1)*/st_astext(a.g), st_astext(b.g) from t1 a join t1 b where st_contains(a.g, b.g); Query Plan =============================================================== |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| --------------------------------------------------------------- -|0 |NESTED-LOOP JOIN | |27 |345 | +|0 |NESTED-LOOP JOIN | |21 |345 | |1 |├─TABLE FULL SCAN |a |9 |3 | |2 |└─DISTRIBUTED TABLE FULL SCAN|b(idx)|3 |38 | =============================================================== @@ -469,12 +469,12 @@ Outputs & filters: access([b.__pk_increment], [b.g]), partitions(p0) is_index_back=true, is_global_index=false, filter_before_indexback[false], range_key([b.__cellid_16], [b.__mbr_16], [b.__pk_increment]), range(MIN ; MAX) -explain select st_astext(a.g), st_astext(b.g) from t1 a join t1 b where st_within(a.g, b.g); +explain select /*+dynamic_sampling(1)*/st_astext(a.g), st_astext(b.g) from t1 a join t1 b where st_within(a.g, b.g); Query Plan =============================================================== |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| --------------------------------------------------------------- -|0 |NESTED-LOOP JOIN | |27 |345 | +|0 |NESTED-LOOP JOIN | |21 |345 | |1 |├─TABLE FULL SCAN |a |9 |3 | |2 |└─DISTRIBUTED TABLE FULL SCAN|b(idx)|3 |38 | =============================================================== @@ -490,12 +490,12 @@ Outputs & filters: access([b.__pk_increment], [b.g]), partitions(p0) is_index_back=true, is_global_index=false, filter_before_indexback[false], range_key([b.__cellid_16], [b.__mbr_16], [b.__pk_increment]), range(MIN ; MAX) -explain select st_astext(a.g), st_astext(b.g) from t1 a join t1 b where _st_dwithin(a.g, b.g, 0.1); +explain select /*+dynamic_sampling(1)*/st_astext(a.g), st_astext(b.g) from t1 a join t1 b where _st_dwithin(a.g, b.g, 0.1); Query Plan =============================================================== |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| --------------------------------------------------------------- -|0 |NESTED-LOOP JOIN | |27 |345 | +|0 |NESTED-LOOP JOIN | |21 |345 | |1 |├─TABLE FULL SCAN |a |9 |3 | |2 |└─DISTRIBUTED TABLE FULL SCAN|b(idx)|3 |38 | =============================================================== diff --git a/tools/deploy/mysql_test/test_suite/geometry/r/mysql/geometry_filter_mysql.result b/tools/deploy/mysql_test/test_suite/geometry/r/mysql/geometry_filter_mysql.result index 58c8238fae..f754acba51 100644 --- a/tools/deploy/mysql_test/test_suite/geometry/r/mysql/geometry_filter_mysql.result +++ b/tools/deploy/mysql_test/test_suite/geometry/r/mysql/geometry_filter_mysql.result @@ -127,8 +127,8 @@ Optimization Info: table_rows:8 physical_range_rows:8 logical_range_rows:8 - index_back_rows:8 - output_rows:1 + index_back_rows:2 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx, t] @@ -188,8 +188,8 @@ Optimization Info: table_rows:8 physical_range_rows:8 logical_range_rows:8 - index_back_rows:8 - output_rows:1 + index_back_rows:2 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx, t] @@ -205,7 +205,7 @@ Query Plan ================================================= |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| ------------------------------------------------- -|0 |TABLE FULL SCAN|t(idx)|2 |355 | +|0 |TABLE FULL SCAN|t(idx)|1 |355 | ================================================= Outputs & filters: ------------------------------------- @@ -249,8 +249,8 @@ Optimization Info: table_rows:8 physical_range_rows:8 logical_range_rows:8 - index_back_rows:8 - output_rows:2 + index_back_rows:2 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx, t] @@ -266,7 +266,7 @@ Query Plan ================================================= |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| ------------------------------------------------- -|0 |TABLE FULL SCAN|t(idx)|5 |363 | +|0 |TABLE FULL SCAN|t(idx)|1 |363 | ================================================= Outputs & filters: ------------------------------------- @@ -311,8 +311,8 @@ Optimization Info: table_rows:8 physical_range_rows:8 logical_range_rows:8 - index_back_rows:8 - output_rows:5 + index_back_rows:2 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx, t] @@ -328,7 +328,7 @@ Query Plan ================================================= |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| ------------------------------------------------- -|0 |TABLE FULL SCAN|t(idx)|2 |355 | +|0 |TABLE FULL SCAN|t(idx)|1 |355 | ================================================= Outputs & filters: ------------------------------------- @@ -372,8 +372,8 @@ Optimization Info: table_rows:8 physical_range_rows:8 logical_range_rows:8 - index_back_rows:8 - output_rows:2 + index_back_rows:2 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx, t] @@ -389,7 +389,7 @@ Query Plan ================================================= |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| ------------------------------------------------- -|0 |TABLE FULL SCAN|t(idx)|3 |359 | +|0 |TABLE FULL SCAN|t(idx)|1 |359 | ================================================= Outputs & filters: ------------------------------------- @@ -434,8 +434,8 @@ Optimization Info: table_rows:8 physical_range_rows:8 logical_range_rows:8 - index_back_rows:8 - output_rows:3 + index_back_rows:2 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx, t] @@ -451,7 +451,7 @@ Query Plan ================================================= |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| ------------------------------------------------- -|0 |TABLE FULL SCAN|t(idx)|6 |351 | +|0 |TABLE FULL SCAN|t(idx)|1 |351 | ================================================= Outputs & filters: ------------------------------------- @@ -496,8 +496,8 @@ Optimization Info: table_rows:8 physical_range_rows:8 logical_range_rows:8 - index_back_rows:8 - output_rows:6 + index_back_rows:2 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx, t] @@ -513,7 +513,7 @@ Query Plan ================================================= |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| ------------------------------------------------- -|0 |TABLE FULL SCAN|t(idx)|3 |355 | +|0 |TABLE FULL SCAN|t(idx)|1 |355 | ================================================= Outputs & filters: ------------------------------------- @@ -557,8 +557,8 @@ Optimization Info: table_rows:8 physical_range_rows:8 logical_range_rows:8 - index_back_rows:8 - output_rows:3 + index_back_rows:2 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx, t] @@ -677,8 +677,8 @@ Optimization Info: table_rows:8 physical_range_rows:8 logical_range_rows:8 - index_back_rows:8 - output_rows:2 + index_back_rows:3 + output_rows:1 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx, t] @@ -738,8 +738,8 @@ Optimization Info: table_rows:8 physical_range_rows:8 logical_range_rows:8 - index_back_rows:8 - output_rows:1 + index_back_rows:0 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx, t] @@ -1008,8 +1008,8 @@ Optimization Info: table_rows:2 physical_range_rows:2 logical_range_rows:2 - index_back_rows:2 - output_rows:1 + index_back_rows:0 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[geom, geo_table2] @@ -1077,8 +1077,8 @@ Optimization Info: table_rows:2 physical_range_rows:2 logical_range_rows:2 - index_back_rows:2 - output_rows:1 + index_back_rows:0 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[geom, geo_table2] @@ -1115,8 +1115,8 @@ Query Plan ============================================================ |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| ------------------------------------------------------------ -|0 |SORT | |2 |299 | -|1 |└─TABLE FULL SCAN|geo_table(geom)|2 |299 | +|0 |SORT | |1 |299 | +|1 |└─TABLE FULL SCAN|geo_table(geom)|1 |299 | ============================================================ Outputs & filters: ------------------------------------- @@ -1162,8 +1162,8 @@ Optimization Info: table_rows:6 physical_range_rows:6 logical_range_rows:6 - index_back_rows:6 - output_rows:2 + index_back_rows:1 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[geom, geo_table] @@ -1335,7 +1335,7 @@ Query Plan ================================================= |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| ------------------------------------------------- -|0 |TABLE FULL SCAN|t(idx)|7 |523 | +|0 |TABLE FULL SCAN|t(idx)|1 |523 | ================================================= Outputs & filters: ------------------------------------- @@ -1379,8 +1379,8 @@ Optimization Info: table_rows:14 physical_range_rows:14 logical_range_rows:14 - index_back_rows:14 - output_rows:7 + index_back_rows:3 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx, t] @@ -1396,7 +1396,7 @@ Query Plan ================================================= |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| ------------------------------------------------- -|0 |TABLE FULL SCAN|t(idx)|6 |523 | +|0 |TABLE FULL SCAN|t(idx)|1 |523 | ================================================= Outputs & filters: ------------------------------------- @@ -1440,8 +1440,8 @@ Optimization Info: table_rows:14 physical_range_rows:14 logical_range_rows:14 - index_back_rows:14 - output_rows:6 + index_back_rows:3 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx, t] @@ -1457,7 +1457,7 @@ Query Plan ================================================= |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| ------------------------------------------------- -|0 |TABLE FULL SCAN|t(idx)|4 |523 | +|0 |TABLE FULL SCAN|t(idx)|1 |523 | ================================================= Outputs & filters: ------------------------------------- @@ -1501,8 +1501,8 @@ Optimization Info: table_rows:14 physical_range_rows:14 logical_range_rows:14 - index_back_rows:14 - output_rows:4 + index_back_rows:3 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx, t] @@ -1564,8 +1564,8 @@ Optimization Info: table_rows:14 physical_range_rows:14 logical_range_rows:14 - index_back_rows:14 - output_rows:1 + index_back_rows:3 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx, t] @@ -1581,7 +1581,7 @@ Query Plan ================================================= |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| ------------------------------------------------- -|0 |TABLE FULL SCAN|t(idx)|5 |523 | +|0 |TABLE FULL SCAN|t(idx)|1 |523 | ================================================= Outputs & filters: ------------------------------------- @@ -1625,8 +1625,8 @@ Optimization Info: table_rows:14 physical_range_rows:14 logical_range_rows:14 - index_back_rows:14 - output_rows:5 + index_back_rows:3 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx, t] @@ -1642,7 +1642,7 @@ Query Plan ================================================= |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| ------------------------------------------------- -|0 |TABLE FULL SCAN|t(idx)|2 |527 | +|0 |TABLE FULL SCAN|t(idx)|1 |527 | ================================================= Outputs & filters: ------------------------------------- @@ -1687,8 +1687,8 @@ Optimization Info: table_rows:14 physical_range_rows:14 logical_range_rows:14 - index_back_rows:14 - output_rows:2 + index_back_rows:3 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx, t] @@ -1749,8 +1749,8 @@ Optimization Info: table_rows:14 physical_range_rows:14 logical_range_rows:14 - index_back_rows:14 - output_rows:1 + index_back_rows:3 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx, t] @@ -1766,7 +1766,7 @@ Query Plan ================================================= |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| ------------------------------------------------- -|0 |TABLE FULL SCAN|t(idx)|2 |523 | +|0 |TABLE FULL SCAN|t(idx)|1 |523 | ================================================= Outputs & filters: ------------------------------------- @@ -1810,8 +1810,8 @@ Optimization Info: table_rows:14 physical_range_rows:14 logical_range_rows:14 - index_back_rows:14 - output_rows:2 + index_back_rows:3 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx, t] @@ -1983,8 +1983,8 @@ Optimization Info: table_rows:14 physical_range_rows:14 logical_range_rows:14 - index_back_rows:14 - output_rows:1 + index_back_rows:3 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx, t] @@ -2044,8 +2044,8 @@ Optimization Info: table_rows:14 physical_range_rows:14 logical_range_rows:14 - index_back_rows:14 - output_rows:1 + index_back_rows:3 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx, t] @@ -2105,8 +2105,8 @@ Optimization Info: table_rows:14 physical_range_rows:14 logical_range_rows:14 - index_back_rows:14 - output_rows:1 + index_back_rows:3 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx, t] @@ -2122,7 +2122,7 @@ Query Plan ================================================= |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| ------------------------------------------------- -|0 |TABLE FULL SCAN|t(idx)|9 |531 | +|0 |TABLE FULL SCAN|t(idx)|1 |531 | ================================================= Outputs & filters: ------------------------------------- @@ -2167,8 +2167,8 @@ Optimization Info: table_rows:14 physical_range_rows:14 logical_range_rows:14 - index_back_rows:14 - output_rows:9 + index_back_rows:3 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx, t] @@ -2184,7 +2184,7 @@ Query Plan ================================================= |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| ------------------------------------------------- -|0 |TABLE FULL SCAN|t(idx)|3 |523 | +|0 |TABLE FULL SCAN|t(idx)|1 |523 | ================================================= Outputs & filters: ------------------------------------- @@ -2228,8 +2228,8 @@ Optimization Info: table_rows:14 physical_range_rows:14 logical_range_rows:14 - index_back_rows:14 - output_rows:3 + index_back_rows:3 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx, t] @@ -2245,7 +2245,7 @@ Query Plan ================================================= |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| ------------------------------------------------- -|0 |TABLE FULL SCAN|t(idx)|2 |527 | +|0 |TABLE FULL SCAN|t(idx)|1 |527 | ================================================= Outputs & filters: ------------------------------------- @@ -2290,8 +2290,8 @@ Optimization Info: table_rows:14 physical_range_rows:14 logical_range_rows:14 - index_back_rows:14 - output_rows:2 + index_back_rows:3 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx, t] @@ -2307,7 +2307,7 @@ Query Plan ================================================= |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| ------------------------------------------------- -|0 |TABLE FULL SCAN|t(idx)|6 |519 | +|0 |TABLE FULL SCAN|t(idx)|1 |519 | ================================================= Outputs & filters: ------------------------------------- @@ -2352,8 +2352,8 @@ Optimization Info: table_rows:14 physical_range_rows:14 logical_range_rows:14 - index_back_rows:14 - output_rows:6 + index_back_rows:3 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx, t] @@ -2369,7 +2369,7 @@ Query Plan ================================================= |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| ------------------------------------------------- -|0 |TABLE FULL SCAN|t(idx)|2 |523 | +|0 |TABLE FULL SCAN|t(idx)|1 |523 | ================================================= Outputs & filters: ------------------------------------- @@ -2413,8 +2413,8 @@ Optimization Info: table_rows:14 physical_range_rows:14 logical_range_rows:14 - index_back_rows:14 - output_rows:2 + index_back_rows:3 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx, t] @@ -2430,7 +2430,7 @@ Query Plan ================================================= |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| ------------------------------------------------- -|0 |TABLE FULL SCAN|t(idx)|3 |523 | +|0 |TABLE FULL SCAN|t(idx)|1 |523 | ================================================= Outputs & filters: ------------------------------------- @@ -2474,8 +2474,8 @@ Optimization Info: table_rows:14 physical_range_rows:14 logical_range_rows:14 - index_back_rows:14 - output_rows:3 + index_back_rows:3 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx, t] @@ -2491,7 +2491,7 @@ Query Plan ================================================= |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| ------------------------------------------------- -|0 |TABLE FULL SCAN|t(idx)|4 |523 | +|0 |TABLE FULL SCAN|t(idx)|1 |523 | ================================================= Outputs & filters: ------------------------------------- @@ -2535,8 +2535,8 @@ Optimization Info: table_rows:14 physical_range_rows:14 logical_range_rows:14 - index_back_rows:14 - output_rows:4 + index_back_rows:3 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx, t] @@ -2552,7 +2552,7 @@ Query Plan ================================================= |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| ------------------------------------------------- -|0 |TABLE FULL SCAN|t(idx)|4 |523 | +|0 |TABLE FULL SCAN|t(idx)|1 |523 | ================================================= Outputs & filters: ------------------------------------- @@ -2596,8 +2596,8 @@ Optimization Info: table_rows:14 physical_range_rows:14 logical_range_rows:14 - index_back_rows:14 - output_rows:4 + index_back_rows:3 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx, t] @@ -2659,8 +2659,8 @@ Optimization Info: table_rows:14 physical_range_rows:14 logical_range_rows:14 - index_back_rows:14 - output_rows:1 + index_back_rows:3 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx, t] @@ -2676,7 +2676,7 @@ Query Plan ================================================= |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| ------------------------------------------------- -|0 |TABLE FULL SCAN|t(idx)|3 |523 | +|0 |TABLE FULL SCAN|t(idx)|1 |523 | ================================================= Outputs & filters: ------------------------------------- @@ -2720,8 +2720,8 @@ Optimization Info: table_rows:14 physical_range_rows:14 logical_range_rows:14 - index_back_rows:14 - output_rows:3 + index_back_rows:3 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx, t] @@ -2737,7 +2737,7 @@ Query Plan ================================================= |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| ------------------------------------------------- -|0 |TABLE FULL SCAN|t(idx)|2 |527 | +|0 |TABLE FULL SCAN|t(idx)|1 |527 | ================================================= Outputs & filters: ------------------------------------- @@ -2782,8 +2782,8 @@ Optimization Info: table_rows:14 physical_range_rows:14 logical_range_rows:14 - index_back_rows:14 - output_rows:2 + index_back_rows:3 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx, t] @@ -2844,8 +2844,8 @@ Optimization Info: table_rows:14 physical_range_rows:14 logical_range_rows:14 - index_back_rows:14 - output_rows:1 + index_back_rows:3 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx, t] @@ -2861,7 +2861,7 @@ Query Plan ================================================= |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| ------------------------------------------------- -|0 |TABLE FULL SCAN|t(idx)|2 |523 | +|0 |TABLE FULL SCAN|t(idx)|1 |523 | ================================================= Outputs & filters: ------------------------------------- @@ -2905,8 +2905,8 @@ Optimization Info: table_rows:14 physical_range_rows:14 logical_range_rows:14 - index_back_rows:14 - output_rows:2 + index_back_rows:3 + output_rows:0 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx, t] diff --git a/tools/deploy/mysql_test/test_suite/geometry/r/mysql/geometry_partition_table_mysql.result b/tools/deploy/mysql_test/test_suite/geometry/r/mysql/geometry_partition_table_mysql.result index b3df8bab93..9a663bb42b 100644 --- a/tools/deploy/mysql_test/test_suite/geometry/r/mysql/geometry_partition_table_mysql.result +++ b/tools/deploy/mysql_test/test_suite/geometry/r/mysql/geometry_partition_table_mysql.result @@ -10,8 +10,8 @@ Query Plan ====================================================================== |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| ---------------------------------------------------------------------- -|0 |PX COORDINATOR | |1 |291 | -|1 |└─EXCHANGE OUT DISTR |:EX10000 |1 |291 | +|0 |PX COORDINATOR | |1 |289 | +|1 |└─EXCHANGE OUT DISTR |:EX10000 |1 |289 | |2 | └─PX PARTITION ITERATOR| |1 |289 | |3 | └─TABLE FULL SCAN |partition_t1(idx)|1 |289 | ====================================================================== @@ -61,10 +61,10 @@ Query Plan ============================================================= |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| ------------------------------------------------------------- -|0 |PX COORDINATOR | |10 |565 | -|1 |└─EXCHANGE OUT DISTR |:EX10000|10 |558 | -|2 | └─PX PARTITION ITERATOR| |10 |542 | -|3 | └─TABLE FULL SCAN |t1(idx) |10 |542 | +|0 |PX COORDINATOR | |1 |543 | +|1 |└─EXCHANGE OUT DISTR |:EX10000|1 |542 | +|2 | └─PX PARTITION ITERATOR| |1 |541 | +|3 | └─TABLE FULL SCAN |t1(idx) |1 |541 | ============================================================= Outputs & filters: ------------------------------------- diff --git a/tools/deploy/mysql_test/test_suite/geometry/t/geometry_bugfix_mysql.test b/tools/deploy/mysql_test/test_suite/geometry/t/geometry_bugfix_mysql.test index 03c5c9a27a..2094833ac3 100644 --- a/tools/deploy/mysql_test/test_suite/geometry/t/geometry_bugfix_mysql.test +++ b/tools/deploy/mysql_test/test_suite/geometry/t/geometry_bugfix_mysql.test @@ -334,10 +334,10 @@ INSERT INTO t1 (g) VALUES (ST_GeomFromText('POINT(7 7)', 3294)), (ST_GeomFromText('LINESTRING(0 0, 3 3)',3294)); -explain select st_astext(a.g), st_astext(b.g) from t1 a join t1 b where _st_covers(a.g, b.g); -explain select st_astext(a.g), st_astext(b.g) from t1 a join t1 b where st_contains(a.g, b.g); -explain select st_astext(a.g), st_astext(b.g) from t1 a join t1 b where st_within(a.g, b.g); -explain select st_astext(a.g), st_astext(b.g) from t1 a join t1 b where _st_dwithin(a.g, b.g, 0.1); +explain select /*+dynamic_sampling(1)*/st_astext(a.g), st_astext(b.g) from t1 a join t1 b where _st_covers(a.g, b.g); +explain select /*+dynamic_sampling(1)*/st_astext(a.g), st_astext(b.g) from t1 a join t1 b where st_contains(a.g, b.g); +explain select /*+dynamic_sampling(1)*/st_astext(a.g), st_astext(b.g) from t1 a join t1 b where st_within(a.g, b.g); +explain select /*+dynamic_sampling(1)*/st_astext(a.g), st_astext(b.g) from t1 a join t1 b where _st_dwithin(a.g, b.g, 0.1); select st_astext(a.g), st_astext(b.g) from t1 a join t1 b where _st_covers(a.g, b.g); select st_astext(a.g), st_astext(b.g) from t1 a join t1 b where st_contains(a.g, b.g);