diff --git a/src/sql/optimizer/ob_log_plan.cpp b/src/sql/optimizer/ob_log_plan.cpp index 1ffcd6dd16..52f4fdab97 100644 --- a/src/sql/optimizer/ob_log_plan.cpp +++ b/src/sql/optimizer/ob_log_plan.cpp @@ -1178,12 +1178,23 @@ int ObLogPlan::generate_inner_join_detectors(const ObIArray &table_i ObSEArray outer_join_detectors; ObSEArray all_table_filters; ObSEArray table_filters; + ObSEArray redundant_quals; + ObSEArray all_quals; ObRelIds all_table_ids; ObRelIds table_ids; if (OB_FAIL(split_or_quals(table_items, quals))) { LOG_WARN("failed to split or quals", K(ret)); } else if (OB_FAIL(get_table_ids(table_items, all_table_ids))) { LOG_WARN("failed to get table ids", K(ret)); + } else if (OB_FAIL(deduce_redundant_join_conds(quals, + redundant_quals))) { + LOG_WARN("failed to deduce redundancy quals", K(ret)); + } else if (OB_FAIL(all_quals.assign(quals))) { + LOG_WARN("failed to assign array", K(ret)); + } else if (OB_FAIL(append(all_quals, redundant_quals))) { + LOG_WARN("failed to append array", K(ret)); + } else { + OPT_TRACE("deduce redundant qual:", redundant_quals); } //1. 生成单个table item内部的冲突规则 for (int64_t i = 0; OB_SUCC(ret) && i < table_items.count(); ++i) { @@ -1224,8 +1235,8 @@ int ObLogPlan::generate_inner_join_detectors(const ObIArray &table_i ObRawExpr *expr = NULL; ConflictDetector *detector = NULL; ObSEArray join_conditions; - for (int64_t i = 0; OB_SUCC(ret) && i < quals.count(); ++i) { - if (OB_ISNULL(expr = quals.at(i))) { + for (int64_t i = 0; OB_SUCC(ret) && i < all_quals.count(); ++i) { + if (OB_ISNULL(expr = all_quals.at(i))) { ret = OB_ERR_UNEXPECTED; LOG_WARN("unexpect null expr", K(ret)); } else if (ObOptimizerUtil::find_item(all_table_filters, expr)) { @@ -13967,3 +13978,92 @@ int ObLogPlan::allocate_values_table_path(ValuesTablePath *values_table_path, } return ret; } + +int ObLogPlan::deduce_redundant_join_conds(const ObIArray &quals, + ObIArray &redundant_quals) +{ + int ret = OB_SUCCESS; + EqualSets all_equal_sets; + ObSEArray connect_infos; + if (OB_FAIL(ObEqualAnalysis::compute_equal_set(&allocator_, + quals, + all_equal_sets))) { + LOG_WARN("failed to compute equal set", K(ret)); + } + for (int64_t i = 0; OB_SUCC(ret) && i < quals.count(); ++i) { + if (OB_ISNULL(quals.at(i))) { + ret = OB_ERR_UNEXPECTED; + LOG_WARN("get unexpected null", K(ret)); + } else if (OB_FAIL(add_var_to_array_no_dup(connect_infos, + quals.at(i)->get_relation_ids()))) { + LOG_WARN("failed to add var to array no dup", K(ret)); + } + } + for (int64_t i = 0; OB_SUCC(ret) && i < all_equal_sets.count(); ++i) { + ObIArray *esets = all_equal_sets.at(i); + if (OB_ISNULL(esets)) { + ret = OB_ERR_UNEXPECTED; + LOG_WARN("get unexpected null", K(ret)); + } else if (OB_FAIL(deduce_redundant_join_conds_with_equal_set(*esets, + connect_infos, + redundant_quals))) { + LOG_WARN("failed to deduce redundancy quals with equal set", K(ret)); + } + } + return ret; +} + +int ObLogPlan::deduce_redundant_join_conds_with_equal_set( + const ObIArray &equal_set, + ObIArray &connect_infos, + ObIArray &redundant_quals) +{ + int ret = OB_SUCCESS; + ObRelIds table_ids; + ObRawExpr *new_expr = NULL; + if (OB_ISNULL(get_optimizer_context().get_session_info())) { + ret = OB_ERR_UNEXPECTED; + LOG_WARN("get unexpected null", K(ret)); + } + for (int64_t m = 0; OB_SUCC(ret) && m < equal_set.count() - 1; ++m) { + for (int64_t n = m + 1; OB_SUCC(ret) && n < equal_set.count(); ++n) { + table_ids.reuse(); + new_expr = NULL; + if (OB_ISNULL(equal_set.at(m)) || + OB_ISNULL(equal_set.at(n))) { + ret = OB_ERR_UNEXPECTED; + LOG_WARN("get unexpected null", K(ret)); + } else if (equal_set.at(m)->get_result_meta() != + equal_set.at(n)->get_result_meta()) { + // do nothing + } else if (!equal_set.at(m)->has_flag(CNT_COLUMN) || + !equal_set.at(n)->has_flag(CNT_COLUMN) || + equal_set.at(m)->get_relation_ids().overlap(equal_set.at(n)->get_relation_ids())) { + // do nothing + } else if (OB_FAIL(table_ids.add_members(equal_set.at(m)->get_relation_ids())) || + OB_FAIL(table_ids.add_members(equal_set.at(n)->get_relation_ids()))) { + LOG_WARN("failed to add members", K(ret)); + } else if (ObOptimizerUtil::find_item(connect_infos, table_ids)) { + // do nothing + } else if (OB_FAIL(ObRawExprUtils::create_double_op_expr( + get_optimizer_context().get_expr_factory(), + get_optimizer_context().get_session_info(), + T_OP_EQ, + new_expr, + equal_set.at(m), + equal_set.at(n)))) { + LOG_WARN("failed to create double op expr", K(ret)); + } else if (OB_ISNULL(new_expr)) { + ret = OB_ERR_UNEXPECTED; + LOG_WARN("get unexpected null", K(ret)); + } else if (OB_FAIL(new_expr->pull_relation_id())) { + LOG_WARN("failed to pull releation id"); + } else if (OB_FAIL(connect_infos.push_back(table_ids))) { + LOG_WARN("failed to push back array", K(ret)); + } else if (OB_FAIL(redundant_quals.push_back(new_expr))) { + LOG_WARN("failed to push back array", K(ret)); + } + } + } + return ret; +} diff --git a/src/sql/optimizer/ob_log_plan.h b/src/sql/optimizer/ob_log_plan.h index 5b3a51ea37..7ea8490767 100644 --- a/src/sql/optimizer/ob_log_plan.h +++ b/src/sql/optimizer/ob_log_plan.h @@ -1743,6 +1743,11 @@ public: bool has_added_win_dist() const { return outline_print_flags_ & ADDED_WIN_DIST_HINT; } void set_added_win_dist() { outline_print_flags_ |= ADDED_WIN_DIST_HINT; } const common::ObIArray &get_onetime_query_refs() const { return onetime_query_refs_; } + int deduce_redundant_join_conds(const ObIArray &quals, + ObIArray &redundancy_quals); + int deduce_redundant_join_conds_with_equal_set(const ObIArray &equal_set, + ObIArray &connect_infos, + ObIArray &redundancy_quals); private: static const int64_t IDP_PATHNUM_THRESHOLD = 5000; protected: // member variable diff --git a/src/sql/rewrite/ob_predicate_deduce.cpp b/src/sql/rewrite/ob_predicate_deduce.cpp index cca5cccc9d..39903ea57c 100644 --- a/src/sql/rewrite/ob_predicate_deduce.cpp +++ b/src/sql/rewrite/ob_predicate_deduce.cpp @@ -171,8 +171,10 @@ int ObPredicateDeduce::choose_equal_preds(ObIArray &chosen, if (OB_FAIL(expr_equal_with_const.add_member(var_id))) { LOG_WARN("failed to add member", K(ret)); } - } else if (!is_table_filter(i, j)) { + } else if (is_const(i) && is_const(j)) { set(chosen, i, j, EQ); + } else if (!is_table_filter(i, j)) { + // do nothing } else if (OB_FAIL(table_filter.push_back(i * N + j))) { LOG_WARN("failed to push back table filter", K(ret)); } diff --git a/src/sql/rewrite/ob_transform_predicate_move_around.cpp b/src/sql/rewrite/ob_transform_predicate_move_around.cpp index 9c95b838c3..d3a0104fc8 100644 --- a/src/sql/rewrite/ob_transform_predicate_move_around.cpp +++ b/src/sql/rewrite/ob_transform_predicate_move_around.cpp @@ -2787,6 +2787,7 @@ int ObTransformPredicateMoveAround::pushdown_semi_info_right_filter(ObDMLStmt *s TableItem *view_table = NULL; bool can_push = false; ObSEArray right_filters; + ObSEArray column_exprs; if (OB_ISNULL(stmt) || OB_ISNULL(ctx) || OB_ISNULL(semi_info) || OB_ISNULL(ctx->expr_factory_)) { ret = OB_ERR_UNEXPECTED; LOG_WARN("unexpected null", K(ret), K(stmt), K(ctx), K(semi_info), K(ctx->expr_factory_)); @@ -2806,6 +2807,8 @@ int ObTransformPredicateMoveAround::pushdown_semi_info_right_filter(ObDMLStmt *s LOG_WARN("failed to remove right filters", K(ret)); } else if (OB_FAIL(add_var_to_array_no_dup(transed_stmts_, stmt))) { LOG_WARN("append transed stmt failed", K(ret)); + } else if (OB_FAIL(stmt->get_column_exprs(semi_info->right_table_id_, column_exprs))) { + LOG_WARN("failed to get column exprs", K(ret)); } else if (OB_FAIL(ObTransformUtils::replace_with_empty_view(ctx_, stmt, view_table, @@ -2815,7 +2818,9 @@ int ObTransformPredicateMoveAround::pushdown_semi_info_right_filter(ObDMLStmt *s stmt, view_table, right_table, - &right_filters))) { + &right_filters, + NULL, + &column_exprs))) { LOG_WARN("failed to create view with table", K(ret)); } else if (OB_FAIL(rename_pullup_predicates(*stmt, *view_table, pullup_preds))) { LOG_WARN("failed to rename pullup preds", K(ret)); diff --git a/tools/deploy/mysql_test/test_suite/join/r/mysql/join_merge.result b/tools/deploy/mysql_test/test_suite/join/r/mysql/join_merge.result index 6011a2f384..04f7d34fc2 100644 --- a/tools/deploy/mysql_test/test_suite/join/r/mysql/join_merge.result +++ b/tools/deploy/mysql_test/test_suite/join/r/mysql/join_merge.result @@ -288,7 +288,7 @@ Query Plan ===================================================== |ID|OPERATOR |NAME|EST.ROWS|EST.TIME(us)| ----------------------------------------------------- -|0 |MERGE JOIN | |4 |17 | +|0 |MERGE JOIN | |2 |17 | |1 |├─MERGE JOIN | |5 |12 | |2 |│ ├─SORT | |6 |6 | |3 |│ │ └─TABLE FULL SCAN|aa |6 |5 | @@ -300,9 +300,9 @@ Query Plan Outputs & filters: ------------------------------------- 0 - output([cc.c2], [aa.a3]), filter(nil), rowset=16 - equal_conds([aa.a2 = cc.c2], [aa.a3 = cc.c3]), other_conds(nil) + equal_conds([aa.a2 = cc.c2], [bb.b3 = cc.c3]), other_conds(nil) merge_directions([ASC], [DESC]) - 1 - output([aa.a3], [aa.a2]), filter(nil), rowset=16 + 1 - output([aa.a3], [aa.a2], [bb.b3]), filter(nil), rowset=16 equal_conds([aa.a2 = bb.b2], [aa.a3 = bb.b3]), other_conds(nil) merge_directions([ASC], [DESC]) 2 - output([aa.a3], [aa.a2]), filter(nil), rowset=16 @@ -311,7 +311,7 @@ Outputs & filters: access([aa.a2], [aa.a3]), partitions(p0) is_index_back=false, is_global_index=false, range_key([aa.a1]), range(MIN ; MAX)always true - 4 - output([bb.b2], [bb.b3]), filter(nil), rowset=16 + 4 - output([bb.b3], [bb.b2]), filter(nil), rowset=16 sort_keys([bb.b2, ASC], [bb.b3, DESC]) 5 - output([bb.b2], [bb.b3]), filter(nil), rowset=16 access([bb.b2], [bb.b3]), partitions(p0) @@ -332,7 +332,7 @@ Query Plan ===================================================== |ID|OPERATOR |NAME|EST.ROWS|EST.TIME(us)| ----------------------------------------------------- -|0 |MERGE JOIN | |4 |17 | +|0 |MERGE JOIN | |2 |17 | |1 |├─MERGE JOIN | |5 |12 | |2 |│ ├─SORT | |6 |6 | |3 |│ │ └─TABLE FULL SCAN|aa |6 |5 | @@ -344,9 +344,9 @@ Query Plan Outputs & filters: ------------------------------------- 0 - output([cc.c2], [aa.a3]), filter(nil), rowset=16 - equal_conds([aa.a2 = cc.c2], [aa.a3 = cc.c3]), other_conds(nil) + equal_conds([aa.a2 = cc.c2], [bb.b3 = cc.c3]), other_conds(nil) merge_directions([ASC], [DESC]) - 1 - output([aa.a3], [aa.a2]), filter(nil), rowset=16 + 1 - output([aa.a3], [aa.a2], [bb.b3]), filter(nil), rowset=16 equal_conds([aa.a2 = bb.b2], [aa.a3 = bb.b3]), other_conds(nil) merge_directions([ASC], [DESC]) 2 - output([aa.a3], [aa.a2]), filter(nil), rowset=16 @@ -355,7 +355,7 @@ Outputs & filters: access([aa.a2], [aa.a3]), partitions(p0) is_index_back=false, is_global_index=false, range_key([aa.a1]), range(MIN ; MAX)always true - 4 - output([bb.b2], [bb.b3]), filter(nil), rowset=16 + 4 - output([bb.b3], [bb.b2]), filter(nil), rowset=16 sort_keys([bb.b2, ASC], [bb.b3, DESC]) 5 - output([bb.b2], [bb.b3]), filter(nil), rowset=16 access([bb.b2], [bb.b3]), partitions(p0) @@ -889,7 +889,7 @@ Query Plan =================================================================== |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| ------------------------------------------------------------------- -|0 |MERGE JOIN | |4 |76 | +|0 |MERGE JOIN | |2 |76 | |1 |├─MERGE JOIN | |5 |52 | |2 |│ ├─PX COORDINATOR MERGE SORT | |6 |26 | |3 |│ │ └─EXCHANGE OUT DISTR |:EX10000|6 |25 | @@ -910,9 +910,9 @@ Query Plan Outputs & filters: ------------------------------------- 0 - output([cc.c2], [aa.a3]), filter(nil), rowset=16 - equal_conds([aa.a2 = cc.c2], [aa.a3 = cc.c3]), other_conds(nil) + equal_conds([aa.a2 = cc.c2], [bb.b3 = cc.c3]), other_conds(nil) merge_directions([ASC], [DESC]) - 1 - output([aa.a3], [aa.a2]), filter(nil), rowset=16 + 1 - output([aa.a3], [aa.a2], [bb.b3]), filter(nil), rowset=16 equal_conds([aa.a2 = bb.b2], [aa.a3 = bb.b3]), other_conds(nil) merge_directions([ASC], [DESC]) 2 - output([aa.a3], [aa.a2]), filter(nil), rowset=16 @@ -927,11 +927,11 @@ Outputs & filters: access([aa.a2], [aa.a3]), partitions(p[0-4]) is_index_back=false, is_global_index=false, range_key([aa.__pk_increment]), range(MIN ; MAX)always true - 7 - output([bb.b2], [bb.b3]), filter(nil), rowset=16 + 7 - output([bb.b3], [bb.b2]), filter(nil), rowset=16 sort_keys([bb.b2, ASC], [bb.b3, DESC]) - 8 - output([bb.b2], [bb.b3]), filter(nil), rowset=16 + 8 - output([bb.b3], [bb.b2]), filter(nil), rowset=16 dop=1 - 9 - output([bb.b2], [bb.b3]), filter(nil), rowset=16 + 9 - output([bb.b3], [bb.b2]), filter(nil), rowset=16 sort_keys([bb.b2, ASC], [bb.b3, DESC]) 10 - output([bb.b2], [bb.b3]), filter(nil), rowset=16 force partition granule @@ -960,7 +960,7 @@ Query Plan =================================================================== |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| ------------------------------------------------------------------- -|0 |MERGE JOIN | |4 |76 | +|0 |MERGE JOIN | |2 |76 | |1 |├─MERGE JOIN | |5 |52 | |2 |│ ├─PX COORDINATOR MERGE SORT | |6 |26 | |3 |│ │ └─EXCHANGE OUT DISTR |:EX10000|6 |25 | @@ -981,9 +981,9 @@ Query Plan Outputs & filters: ------------------------------------- 0 - output([cc.c2], [aa.a3]), filter(nil), rowset=16 - equal_conds([aa.a2 = cc.c2], [aa.a3 = cc.c3]), other_conds(nil) + equal_conds([aa.a2 = cc.c2], [bb.b3 = cc.c3]), other_conds(nil) merge_directions([ASC], [DESC]) - 1 - output([aa.a3], [aa.a2]), filter(nil), rowset=16 + 1 - output([aa.a3], [aa.a2], [bb.b3]), filter(nil), rowset=16 equal_conds([aa.a2 = bb.b2], [aa.a3 = bb.b3]), other_conds(nil) merge_directions([ASC], [DESC]) 2 - output([aa.a3], [aa.a2]), filter(nil), rowset=16 @@ -998,11 +998,11 @@ Outputs & filters: access([aa.a2], [aa.a3]), partitions(p[0-4]) is_index_back=false, is_global_index=false, range_key([aa.__pk_increment]), range(MIN ; MAX)always true - 7 - output([bb.b2], [bb.b3]), filter(nil), rowset=16 + 7 - output([bb.b3], [bb.b2]), filter(nil), rowset=16 sort_keys([bb.b2, ASC], [bb.b3, DESC]) - 8 - output([bb.b2], [bb.b3]), filter(nil), rowset=16 + 8 - output([bb.b3], [bb.b2]), filter(nil), rowset=16 dop=1 - 9 - output([bb.b2], [bb.b3]), filter(nil), rowset=16 + 9 - output([bb.b3], [bb.b2]), filter(nil), rowset=16 sort_keys([bb.b2, ASC], [bb.b3, DESC]) 10 - output([bb.b2], [bb.b3]), filter(nil), rowset=16 force partition granule diff --git a/tools/deploy/mysql_test/test_suite/optimizer/r/mysql/bushy_leading_hint.result b/tools/deploy/mysql_test/test_suite/optimizer/r/mysql/bushy_leading_hint.result index 667ba63fde..b9b5c35b3f 100644 --- a/tools/deploy/mysql_test/test_suite/optimizer/r/mysql/bushy_leading_hint.result +++ b/tools/deploy/mysql_test/test_suite/optimizer/r/mysql/bushy_leading_hint.result @@ -214,7 +214,7 @@ Query Plan |ID|OPERATOR |NAME|EST.ROWS|EST.TIME(us)| ------------------------------------------------------- |0 |SCALAR GROUP BY | |1 |23 | -|1 |└─HASH JOIN | |3 |23 | +|1 |└─HASH JOIN | |1 |23 | |2 | ├─TABLE FULL SCAN |c |11 |5 | |3 | └─HASH JOIN | |4 |16 | |4 | ├─HASH JOIN | |2 |10 | @@ -227,14 +227,14 @@ Outputs & filters: 0 - output([T_FUN_COUNT(a.c1)], [T_FUN_SUM(b.d1 * b.d2 - a.c2)]), filter(nil), rowset=16 group(nil), agg_func([T_FUN_COUNT(a.c1)], [T_FUN_SUM(b.d1 * b.d2 - a.c2)]) 1 - output([b.d1], [b.d2], [a.c1], [a.c2]), filter(nil), rowset=16 - equal_conds([b.d1 = c.c1], [b.d2 = c.c2]), other_conds(nil) + equal_conds([b.d1 = c.c1], [d.c2 = c.c2]), other_conds(nil) 2 - output([c.c1], [c.c2]), filter(nil), rowset=16 access([c.c1], [c.c2]), partitions(p0) is_index_back=false, is_global_index=false, range_key([c.__pk_increment]), range(MIN ; MAX)always true - 3 - output([b.d1], [b.d2], [a.c1], [a.c2]), filter(nil), rowset=16 - equal_conds([a.c1 = b.d2]), other_conds(nil) - 4 - output([a.c1], [a.c2]), filter(nil), rowset=16 + 3 - output([b.d1], [b.d2], [a.c1], [d.c2], [a.c2]), filter(nil), rowset=16 + equal_conds([b.d2 = a.c1]), other_conds(nil) + 4 - output([a.c1], [d.c2], [a.c2]), filter(nil), rowset=16 equal_conds([d.c2 = a.c1]), other_conds(nil) 5 - output([a.c1], [a.c2]), filter([a.c2 < 5]), rowset=16 access([a.c1], [a.c2]), partitions(p0) @@ -309,8 +309,8 @@ Query Plan =========================================================== |ID|OPERATOR |NAME|EST.ROWS|EST.TIME(us)| ----------------------------------------------------------- -|0 |SCALAR GROUP BY | |1 |56 | -|1 |└─HASH JOIN | |7 |56 | +|0 |SCALAR GROUP BY | |1 |55 | +|1 |└─HASH JOIN | |7 |55 | |2 | ├─HASH JOIN | |3 |33 | |3 | │ ├─HASH JOIN | |2 |20 | |4 | │ │ ├─HASH JOIN | |2 |14 | @@ -404,9 +404,9 @@ Query Plan =================================================================== |ID|OPERATOR |NAME|EST.ROWS|EST.TIME(us)| ------------------------------------------------------------------- -|0 |SCALAR GROUP BY | |1 |266 | -|1 |└─HASH JOIN | |6 |266 | -|2 | ├─HASH JOIN | |67 |211 | +|0 |SCALAR GROUP BY | |1 |259 | +|1 |└─HASH JOIN | |6 |259 | +|2 | ├─HASH JOIN | |67 |210 | |3 | │ ├─HASH JOIN | |19 |22 | |4 | │ │ ├─HASH JOIN | |15 |13 | |5 | │ │ │ ├─TABLE FULL SCAN |t1 |11 |5 | @@ -428,13 +428,13 @@ Outputs & filters: ------------------------------------- 0 - output([T_FUN_COUNT(*)], [T_FUN_SUM(t1.c1 + t2.d1 + t3.c1 + t4.d2 - t5.c1 + t6.d2 - t7.c1 - t8.d2)]), filter(nil), rowset=16 group(nil), agg_func([T_FUN_COUNT(*)], [T_FUN_SUM(t1.c1 + t2.d1 + t3.c1 + t4.d2 - t5.c1 + t6.d2 - t7.c1 - t8.d2)]) - 1 - output([t7.c1], [t2.d1], [t4.d2], [t8.d2], [t6.d2], [t1.c1], [t5.c1], [t3.c1]), filter(nil), rowset=16 - equal_conds([t7.c1 = t2.d1], [t2.d2 = t7.c2], [t8.d1 = t4.d2], [t8.d2 = t6.d2]), other_conds(nil) - 2 - output([t2.d1], [t4.d2], [t6.d2], [t1.c1], [t5.c1], [t2.d2], [t3.c1]), filter(nil), rowset=16 + 1 - output([t7.c1], [t2.d1], [t5.c1], [t4.d2], [t8.d2], [t6.d2], [t1.c1], [t3.c1]), filter(nil), rowset=16 + equal_conds([t7.c1 = t2.d1], [t7.c2 = t5.c1], [t8.d1 = t4.d2], [t8.d2 = t6.d2]), other_conds(nil) + 2 - output([t2.d1], [t5.c1], [t4.d2], [t6.d2], [t1.c1], [t3.c1]), filter(nil), rowset=16 equal_conds([t4.d1 = t1.c1], [t5.c1 = t2.d2], [t6.d2 = t3.c1]), other_conds(nil) - 3 - output([t2.d1], [t1.c1], [t2.d2], [t3.c1]), filter(nil), rowset=16 + 3 - output([t2.d1], [t1.c1], [t3.c1], [t2.d2]), filter(nil), rowset=16 equal_conds([t1.c2 = t3.c1]), other_conds(nil) - 4 - output([t2.d1], [t1.c1], [t2.d2], [t1.c2]), filter(nil), rowset=16 + 4 - output([t2.d1], [t1.c1], [t1.c2], [t2.d2]), filter(nil), rowset=16 equal_conds([t1.c1 = t2.d1]), other_conds(nil) 5 - output([t1.c1], [t1.c2]), filter(nil), rowset=16 access([t1.c1], [t1.c2]), partitions(p0) @@ -448,9 +448,9 @@ Outputs & filters: access([t3.c1]), partitions(p0) is_index_back=false, is_global_index=false, range_key([t3.__pk_increment]), range(MIN ; MAX)always true - 8 - output([t4.d2], [t6.d2], [t5.c1], [t4.d1]), filter(nil), rowset=16 + 8 - output([t5.c1], [t4.d2], [t6.d2], [t4.d1]), filter(nil), rowset=16 conds(nil), nl_params_(nil), use_batch=false - 9 - output([t4.d2], [t5.c1], [t4.d1]), filter(nil), rowset=16 + 9 - output([t5.c1], [t4.d2], [t4.d1]), filter(nil), rowset=16 conds(nil), nl_params_(nil), use_batch=false 10 - output([t4.d1], [t4.d2]), filter(nil), rowset=16 access([t4.d1], [t4.d2]), partitions(p0) @@ -770,29 +770,29 @@ EXPLAIN select /*+ leading(t1, (t2, t3)) */ count(*), sum(t2.d1+t3.c2) from nn1 t1, nn2 t2, nn1 t3 where t1.c1 = t2.d1 and t1.c2 = t3.c1 and t1.c1 =t3.c1+t2.d2; Query Plan -======================================================= -|ID|OPERATOR |NAME|EST.ROWS|EST.TIME(us)| -------------------------------------------------------- -|0 |SCALAR GROUP BY | |1 |22 | -|1 |└─HASH JOIN | |4 |21 | -|2 | ├─TABLE FULL SCAN |t1 |11 |5 | -|3 | └─NESTED-LOOP JOIN | |22 |13 | -|4 | ├─TABLE FULL SCAN |t2 |11 |5 | -|5 | └─MATERIAL | |11 |6 | -|6 | └─TABLE FULL SCAN|t3 |11 |5 | -======================================================= +=============================================================== +|ID|OPERATOR |NAME|EST.ROWS|EST.TIME(us)| +--------------------------------------------------------------- +|0 |SCALAR GROUP BY | |1 |33 | +|1 |└─HASH JOIN | |3 |33 | +|2 | ├─TABLE FULL SCAN |t1 |11 |5 | +|3 | └─NESTED-LOOP JOIN CARTESIAN | |121 |13 | +|4 | ├─TABLE FULL SCAN |t2 |11 |5 | +|5 | └─MATERIAL | |11 |6 | +|6 | └─TABLE FULL SCAN |t3 |11 |5 | +=============================================================== Outputs & filters: ------------------------------------- 0 - output([T_FUN_COUNT(*)], [T_FUN_SUM(t2.d1 + t3.c2)]), filter(nil), rowset=16 group(nil), agg_func([T_FUN_COUNT(*)], [T_FUN_SUM(t2.d1 + t3.c2)]) 1 - output([t2.d1], [t3.c2]), filter(nil), rowset=16 - equal_conds([t1.c1 = t2.d1], [t1.c2 = t3.c1]), other_conds(nil) + equal_conds([t1.c1 = t2.d1], [t1.c2 = t3.c1], [t1.c1 = t3.c1 + t2.d2]), other_conds(nil) 2 - output([t1.c1], [t1.c2]), filter(nil), rowset=16 access([t1.c1], [t1.c2]), partitions(p0) is_index_back=false, is_global_index=false, range_key([t1.__pk_increment]), range(MIN ; MAX)always true - 3 - output([t2.d1], [t3.c1], [t3.c2]), filter(nil), rowset=16 - conds([t2.d1 = t3.c1 + t2.d2]), nl_params_(nil), use_batch=false + 3 - output([t2.d1], [t3.c1], [t2.d2], [t3.c2]), filter(nil), rowset=16 + conds(nil), nl_params_(nil), use_batch=false 4 - output([t2.d1], [t2.d2]), filter(nil), rowset=16 access([t2.d1], [t2.d2]), partitions(p0) is_index_back=false, is_global_index=false, @@ -1051,21 +1051,22 @@ Outputs & filters: ------------------------------------- 0 - output([T_FUN_COUNT(*)], [T_FUN_SUM(t9.c1 - t5.c1 + t4.d2 - t1.c1)]), filter(nil), rowset=16 group(nil), agg_func([T_FUN_COUNT(*)], [T_FUN_SUM(t9.c1 - t5.c1 + t4.d2 - t1.c1)]) - 1 - output([t1.c1], [t4.d2], [t9.c1], [t5.c1]), filter(nil), rowset=16 - equal_conds([t1.c1 % 3 = t2.d2 % 2], [t1.c1 % 5 = t2.d1 % 5], [t1.c2 % 5 = t2.d2 % 5], [t1.c1 % 7 = t2.d1 % 7]), other_conds(nil) - 2 - output([t1.c1], [t1.c1 % 5], [t1.c2 % 5], [t4.d2], [t1.c1 % 7], [t9.c1], [t5.c1], [t1.c1 % 3]), filter(nil), rowset=16 - equal_conds([t1.c2 % 7 = t4.d1 % 3], [t1.c1 % 5 = t4.d1 % 4], [t1.c2 % 5 = t4.d2 % 5], [t1.c1 % 7 = t4.d1 % 7]), other_conds(nil) - 3 - output([t4.d2], [t4.d2 % 5], [t9.c1], [t5.c1], [t4.d1 % 3], [t4.d1 % 4], [t4.d1 % 7]), filter(nil), rowset=16 - equal_conds([t4.d2 % 5 = t9.c1 % 4], [t8.d2 % 5 = t9.c1 % 14]), other_conds(nil) + 1 - output([t1.c1], [t5.c1], [t9.c1], [t4.d2]), filter(nil), rowset=16 + equal_conds([t1.c1 % 3 = t2.d2 % 2], [t2.d1 % 5 = t3.c1 % 4], [t2.d2 % 5 = t5.c1 % 6], [t2.d1 % 7 = t8.d1 % 3]), other_conds(nil) + 2 - output([t1.c1], [t5.c1], [t5.c1 % 6], [t8.d1 % 3], [t9.c1], [t4.d2], [t3.c1 % 4], [t1.c1 % 3]), filter(nil), rowset=16 + equal_conds([t1.c2 % 7 = t4.d1 % 3], [t1.c2 % 5 = t5.c1 % 6], [t1.c1 % 4 = t7.c1 % 3], [t1.c1 % 7 = t8.d1 % 3], [t3.c2 % 7 = t4.d1 % 3], [t3.c2 % + 5 = t5.c1 % 6], [t3.c1 % 7 = t8.d1 % 3]), other_conds(nil) + 3 - output([t5.c1], [t5.c1 % 6], [t8.d1 % 3], [t4.d1 % 3], [t9.c1], [t4.d2], [t7.c1 % 3]), filter(nil), rowset=16 + equal_conds([t7.c2 % 5 = t9.c1 % 4], [t8.d2 % 5 = t9.c1 % 14], [t5.c1 % 6 = t9.c1 % 4]), other_conds(nil) 4 - output([t9.c1]), filter(nil), rowset=16 access([t9.c1]), partitions(p0) is_index_back=false, is_global_index=false, range_key([t9.__pk_increment]), range(MIN ; MAX)always true - 5 - output([t4.d2], [t4.d2 % 5], [t5.c1], [t4.d1 % 3], [t4.d1 % 4], [t4.d1 % 7], [t8.d2]), filter(nil), rowset=16 - equal_conds([t4.d2 % 5 = t5.c1 % 6], [t4.d1 % 3 = t6.d2 % 2], [t4.d1 % 4 = t6.d1 % 4], [t4.d1 % 7 = t6.d1 % 7]), other_conds(nil) - 6 - output([t5.c1], [t5.c1 % 6], [t6.d1 % 4], [t6.d1 % 7], [t8.d2], [t6.d2]), filter(nil), rowset=16 - equal_conds([t5.c1 % 4 = t7.c1 % 1], [t5.c1 % 6 = t7.c2 % 5], [t5.c1 % 7 = t8.d1 % 6], [t6.d1 % 4 = t7.c1 % 3], [t6.d1 % 7 = t7.c1 % 7]), other_conds(nil) - 7 - output([t7.c1], [t7.c1 % 7], [t8.d1], [t8.d2], [t7.c2]), filter(nil), rowset=16 + 5 - output([t5.c1], [t5.c1 % 6], [t8.d1 % 3], [t4.d1 % 3], [t4.d2], [t7.c1 % 3], [t8.d2], [t7.c2]), filter(nil), rowset=16 + equal_conds([t4.d2 % 5 = t5.c1 % 6], [t4.d1 % 4 = t7.c1 % 3], [t4.d1 % 7 = t8.d1 % 3], [t6.d2 % 2 = t4.d1 % 3]), other_conds(nil) + 6 - output([t5.c1], [t5.c1 % 6], [t8.d1 % 3], [t7.c1 % 3], [t8.d2], [t7.c2], [t6.d2]), filter(nil), rowset=16 + equal_conds([t5.c1 % 4 = t7.c1 % 1], [t5.c1 % 7 = t8.d1 % 6], [t6.d1 % 4 = t7.c1 % 3], [t6.d1 % 7 = t8.d1 % 3]), other_conds(nil) + 7 - output([t8.d1 % 3], [t7.c1], [t8.d1], [t8.d2], [t7.c2]), filter(nil), rowset=16 equal_conds([t7.c1 % 7 = t8.d1 % 3]), other_conds(nil) 8 - output([t8.d1], [t8.d2]), filter(nil), rowset=16 access([t8.d1], [t8.d2]), partitions(p0) @@ -1075,7 +1076,7 @@ Outputs & filters: access([t7.c1], [t7.c2]), partitions(p0) is_index_back=false, is_global_index=false, range_key([t7.__pk_increment]), range(MIN ; MAX)always true - 10 - output([t5.c1], [t6.d1], [t5.c1 % 6], [t6.d2]), filter(nil), rowset=16 + 10 - output([t5.c1], [t5.c1 % 6], [t6.d1], [t6.d2]), filter(nil), rowset=16 equal_conds([t5.c1 % 2 = t6.d2 % 5]), other_conds(nil) 11 - output([t6.d2], [t6.d1]), filter(nil), rowset=16 access([t6.d2], [t6.d1]), partitions(p0) @@ -1089,13 +1090,13 @@ Outputs & filters: access([t4.d1], [t4.d2]), partitions(p0) is_index_back=false, is_global_index=false, range_key([t4.__pk_increment]), range(MIN ; MAX)always true - 14 - output([t1.c1], [t1.c1 % 5], [t1.c2 % 5], [t1.c1 % 7], [t1.c1 % 3], [t1.c2 % 7]), filter(nil), rowset=16 - equal_conds([t1.c1 % 5 = t3.c1 % 4], [t1.c1 % 3 = t3.c2 % 7], [t1.c2 % 5 = t3.c2 % 5], [t1.c1 % 7 = t3.c1 % 7]), other_conds(nil) + 14 - output([t1.c1], [t1.c2], [t3.c2], [t3.c1], [t3.c1 % 4], [t3.c2 % 7], [t1.c1 % 3], [t1.c2 % 7], [t1.c1 % 4]), filter(nil), rowset=16 + equal_conds([t1.c1 % 5 = t3.c1 % 4]), other_conds(nil) 15 - output([t3.c1], [t3.c2], [t3.c2 % 7]), filter([t3.c2 % 7 = t3.c1 % 3]), rowset=16 access([t3.c1], [t3.c2]), partitions(p0) is_index_back=false, is_global_index=false, filter_before_indexback[false], range_key([t3.__pk_increment]), range(MIN ; MAX)always true - 16 - output([t1.c1], [t1.c2], [t1.c1 % 5], [t1.c1 % 3], [t1.c2 % 7]), filter([t1.c1 % 3 = t1.c2 % 7], [t1.c1 % 5 = t1.c1 % 4]), rowset=16 + 16 - output([t1.c1], [t1.c2], [t1.c1 % 3], [t1.c2 % 7], [t1.c1 % 5], [t1.c1 % 4]), filter([t1.c1 % 3 = t1.c2 % 7], [t1.c1 % 5 = t1.c1 % 4]), rowset=16 access([t1.c1], [t1.c2]), partitions(p0) is_index_back=false, is_global_index=false, filter_before_indexback[false,false], range_key([t1.__pk_increment]), range(MIN ; MAX)always true @@ -1589,12 +1590,12 @@ Query Plan ============================================================= |ID|OPERATOR |NAME|EST.ROWS|EST.TIME(us)| ------------------------------------------------------------- -|0 |SCALAR GROUP BY | |1 |52 | -|1 |└─HASH JOIN | |10 |51 | -|2 | ├─HASH JOIN | |7 |43 | -|3 | │ ├─HASH JOIN | |5 |37 | -|4 | │ │ ├─HASH JOIN | |4 |30 | -|5 | │ │ │ ├─HASH JOIN | |19 |21 | +|0 |SCALAR GROUP BY | |1 |48 | +|1 |└─HASH JOIN | |10 |48 | +|2 | ├─HASH JOIN | |7 |41 | +|3 | │ ├─HASH JOIN | |5 |35 | +|4 | │ │ ├─HASH JOIN | |4 |29 | +|5 | │ │ │ ├─HASH JOIN | |19 |20 | |6 | │ │ │ │ ├─HASH JOIN | |15 |12 | |7 | │ │ │ │ │ ├─TABLE FULL SCAN|t2 |11 |5 | |8 | │ │ │ │ │ └─TABLE FULL SCAN|t1 |11 |5 | @@ -1748,7 +1749,7 @@ Query Plan |ID|OPERATOR |NAME|EST.ROWS|EST.TIME(us)| ------------------------------------------------------- |0 |SCALAR GROUP BY | |1 |23 | -|1 |└─HASH JOIN | |3 |23 | +|1 |└─HASH JOIN | |1 |23 | |2 | ├─TABLE FULL SCAN |c |11 |5 | |3 | └─HASH JOIN | |4 |16 | |4 | ├─TABLE FULL SCAN |a |2 |5 | @@ -1761,20 +1762,20 @@ Outputs & filters: 0 - output([T_FUN_COUNT(a.c1 + b.d2)], [T_FUN_SUM(b.d2 + b.d2 * a.c1)]), filter(nil), rowset=16 group(nil), agg_func([T_FUN_COUNT(a.c1 + b.d2)], [T_FUN_SUM(b.d2 + b.d2 * a.c1)]) 1 - output([b.d2], [a.c1]), filter(nil), rowset=16 - equal_conds([b.d1 = c.c1], [b.d2 = c.c2]), other_conds(nil) + equal_conds([b.d1 = c.c1], [d.c2 = c.c2]), other_conds(nil) 2 - output([c.c1], [c.c2]), filter(nil), rowset=16 access([c.c1], [c.c2]), partitions(p0) is_index_back=false, is_global_index=false, range_key([c.__pk_increment]), range(MIN ; MAX)always true - 3 - output([b.d2], [a.c1], [b.d1]), filter(nil), rowset=16 - equal_conds([a.c1 = b.d2]), other_conds(nil) + 3 - output([b.d2], [a.c1], [d.c2], [b.d1]), filter(nil), rowset=16 + equal_conds([b.d2 = a.c1]), other_conds(nil) 4 - output([a.c1]), filter([a.c2 < 5]), rowset=16 access([a.c1], [a.c2]), partitions(p0) is_index_back=false, is_global_index=false, filter_before_indexback[false], range_key([a.__pk_increment]), range(MIN ; MAX)always true - 5 - output([b.d2], [b.d1]), filter(nil), rowset=16 + 5 - output([b.d2], [d.c2], [b.d1]), filter(nil), rowset=16 equal_conds([d.c1 = b.d2]), other_conds(nil) - 6 - output([d.c1]), filter([d.c1 = d.c2]), rowset=16 + 6 - output([d.c2], [d.c1]), filter([d.c1 = d.c2]), rowset=16 access([d.c2], [d.c1]), partitions(p0) is_index_back=false, is_global_index=false, filter_before_indexback[false], range_key([d.__pk_increment]), range(MIN ; MAX)always true @@ -1822,8 +1823,8 @@ Query Plan ========================================================= |ID|OPERATOR |NAME|EST.ROWS|EST.TIME(us)| --------------------------------------------------------- -|0 |SCALAR GROUP BY | |1 |65 | -|1 |└─HASH JOIN | |16 |64 | +|0 |SCALAR GROUP BY | |1 |64 | +|1 |└─HASH JOIN | |16 |63 | |2 | ├─HASH JOIN | |7 |39 | |3 | │ ├─HASH JOIN | |3 |17 | |4 | │ │ ├─TABLE FULL SCAN |t2 |11 |5 | @@ -1912,10 +1913,10 @@ Query Plan ============================================================= |ID|OPERATOR |NAME|EST.ROWS|EST.TIME(us)| ------------------------------------------------------------- -|0 |SCALAR GROUP BY | |1 |68 | -|1 |└─HASH JOIN | |19 |68 | -|2 | ├─HASH JOIN | |14 |56 | -|3 | │ ├─HASH JOIN | |10 |47 | +|0 |SCALAR GROUP BY | |1 |64 | +|1 |└─HASH JOIN | |19 |64 | +|2 | ├─HASH JOIN | |14 |54 | +|3 | │ ├─HASH JOIN | |10 |46 | |4 | │ │ ├─HASH JOIN | |7 |39 | |5 | │ │ │ ├─HASH JOIN | |3 |17 | |6 | │ │ │ │ ├─TABLE FULL SCAN |t2 |11 |5 | @@ -2005,8 +2006,8 @@ Query Plan ========================================================= |ID|OPERATOR |NAME|EST.ROWS|EST.TIME(us)| --------------------------------------------------------- -|0 |SCALAR GROUP BY | |1 |60 | -|1 |└─HASH JOIN | |5 |60 | +|0 |SCALAR GROUP BY | |1 |59 | +|1 |└─HASH JOIN | |5 |59 | |2 | ├─HASH JOIN | |2 |40 | |3 | │ ├─HASH JOIN | |1 |19 | |4 | │ │ ├─HASH JOIN | |15 |12 | @@ -2071,7 +2072,7 @@ Outputs & filters: is_index_back=false, is_global_index=false, filter_before_indexback[false], range_key([t8.__pk_increment]), range(MIN ; MAX)always true 15 - output([t7.c1], [t9.c1]), filter(nil), rowset=16 - equal_conds([t7.c1 = t9.c1]), other_conds(nil) + equal_conds([t9.c1 = t7.c1]), other_conds(nil) 16 - output([t9.c1]), filter(nil), rowset=16 access([t9.c1]), partitions(p0) is_index_back=false, is_global_index=false, @@ -2099,7 +2100,7 @@ Query Plan |ID|OPERATOR |NAME|EST.ROWS|EST.TIME(us)| --------------------------------------------------------- |0 |SCALAR GROUP BY | |1 |66 | -|1 |└─HASH JOIN | |16 |66 | +|1 |└─HASH JOIN | |16 |65 | |2 | ├─HASH JOIN | |7 |41 | |3 | │ ├─HASH JOIN | |3 |17 | |4 | │ │ ├─TABLE FULL SCAN |t2 |11 |5 | @@ -2191,9 +2192,9 @@ Query Plan =========================================================== |ID|OPERATOR |NAME|EST.ROWS|EST.TIME(us)| ----------------------------------------------------------- -|0 |SCALAR GROUP BY | |1 |70 | -|1 |└─HASH JOIN | |17 |69 | -|2 | ├─HASH JOIN | |12 |58 | +|0 |SCALAR GROUP BY | |1 |67 | +|1 |└─HASH JOIN | |17 |66 | +|2 | ├─HASH JOIN | |12 |57 | |3 | │ ├─HASH JOIN | |9 |49 | |4 | │ │ ├─HASH JOIN | |3 |17 | |5 | │ │ │ ├─TABLE FULL SCAN |t1 |11 |5 | @@ -2207,17 +2208,17 @@ Query Plan |13| │ │ └─HASH JOIN | |15 |12 | |14| │ │ ├─TABLE FULL SCAN|t6 |11 |5 | |15| │ │ └─TABLE FULL SCAN|t7 |11 |5 | -|16| │ └─TABLE FULL SCAN |t9 |11 |5 | -|17| └─TABLE FULL SCAN |t8 |11 |5 | +|16| │ └─TABLE FULL SCAN |t8 |11 |5 | +|17| └─TABLE FULL SCAN |t9 |11 |5 | =========================================================== Outputs & filters: ------------------------------------- 0 - output([T_FUN_COUNT(*)], [T_FUN_SUM(t1.c1 - t5.c2 + t6.c1) - cast(T_FUN_MAX(t2.c1 * t8.c2), DECIMAL(22, 0))]), filter(nil), rowset=16 group(nil), agg_func([T_FUN_COUNT(*)], [T_FUN_SUM(t1.c1 - t5.c2 + t6.c1)], [T_FUN_MAX(t2.c1 * t8.c2)]) 1 - output([t1.c1], [t2.c1], [t6.c1], [t5.c2], [t8.c2]), filter(nil), rowset=16 - equal_conds([t1.c1 = t8.c1]), other_conds(nil) - 2 - output([t1.c1], [t2.c1], [t6.c1], [t5.c2]), filter(nil), rowset=16 equal_conds([t1.c1 = t9.c1]), other_conds(nil) + 2 - output([t1.c1], [t2.c1], [t6.c1], [t5.c2], [t8.c2]), filter(nil), rowset=16 + equal_conds([t1.c1 = t8.c1]), other_conds(nil) 3 - output([t1.c1], [t2.c1], [t6.c1], [t5.c2]), filter(nil), rowset=16 equal_conds([t1.c1 = t4.c1]), other_conds(nil) 4 - output([t1.c1], [t2.c1]), filter(nil), rowset=16 @@ -2227,12 +2228,12 @@ Outputs & filters: is_index_back=false, is_global_index=false, range_key([t1.__pk_increment]), range(MIN ; MAX)always true 6 - output([t2.c1]), filter(nil), rowset=16 - equal_conds([t2.c1 = t3.c1]), other_conds(nil) + equal_conds([t2.c1 = t3.c2]), other_conds(nil) 7 - output([t2.c1]), filter(nil), rowset=16 access([t2.c1]), partitions(p0) is_index_back=false, is_global_index=false, range_key([t2.__pk_increment]), range(MIN ; MAX)always true - 8 - output([t3.c1]), filter([t3.c2 = t3.c1]), rowset=16 + 8 - output([t3.c2]), filter([t3.c2 = t3.c1]), rowset=16 access([t3.c2], [t3.c1]), partitions(p0) is_index_back=false, is_global_index=false, filter_before_indexback[false], range_key([t3.__pk_increment]), range(MIN ; MAX)always true @@ -2258,14 +2259,14 @@ Outputs & filters: access([t7.c1]), partitions(p0) is_index_back=false, is_global_index=false, range_key([t7.__pk_increment]), range(MIN ; MAX)always true - 16 - output([t9.c1]), filter(nil), rowset=16 - access([t9.c1]), partitions(p0) - is_index_back=false, is_global_index=false, - range_key([t9.__pk_increment]), range(MIN ; MAX)always true - 17 - output([t8.c1], [t8.c2]), filter(nil), rowset=16 + 16 - output([t8.c1], [t8.c2]), filter(nil), rowset=16 access([t8.c1], [t8.c2]), partitions(p0) is_index_back=false, is_global_index=false, range_key([t8.__pk_increment]), range(MIN ; MAX)always true + 17 - output([t9.c1]), filter(nil), rowset=16 + access([t9.c1]), partitions(p0) + is_index_back=false, is_global_index=false, + range_key([t9.__pk_increment]), range(MIN ; MAX)always true select /*+ leading(t1, (t2 t3), (t4, t5 (t6, t7))) use_hash(t4, t5) use_hash(t6,t7) */ count(*), sum(t1.c1-t5.c2+t6.c1) - max(t2.c1*t8.c2) from nn1 t1, nn1 t2, nn1 t3, nn1 t4, nn1 t5, nn1 t6 , nn1 t7, nn1 t8, nn1 t9 where t1.c1 = t2.c1 and t1.c1=t3.c2 and t2.c1 = t3.c1 and t3.c1 = t4.c1 and t4.c1 = t5.c1 and t5.c1 = t6.c1 AND @@ -2283,11 +2284,11 @@ Query Plan =============================================================== |ID|OPERATOR |NAME|EST.ROWS|EST.TIME(us)| --------------------------------------------------------------- -|0 |SCALAR GROUP BY | |1 |80 | -|1 |└─HASH JOIN | |16 |79 | -|2 | ├─HASH JOIN | |11 |69 | -|3 | │ ├─HASH JOIN | |8 |60 | -|4 | │ │ ├─HASH JOIN | |6 |53 | +|0 |SCALAR GROUP BY | |1 |74 | +|1 |└─HASH JOIN | |16 |74 | +|2 | ├─HASH JOIN | |11 |65 | +|3 | │ ├─HASH JOIN | |8 |58 | +|4 | │ │ ├─HASH JOIN | |6 |51 | |5 | │ │ │ ├─HASH JOIN | |32 |38 | |6 | │ │ │ │ ├─TABLE FULL SCAN |t2 |11 |5 | |7 | │ │ │ │ └─HASH JOIN | |25 |29 | @@ -2298,20 +2299,20 @@ Query Plan |12| │ │ │ │ ├─TABLE FULL SCAN|t8 |11 |5 | |13| │ │ │ │ └─TABLE FULL SCAN|t9 |11 |5 | |14| │ │ │ └─TABLE FULL SCAN |t3 |2 |5 | -|15| │ │ └─TABLE FULL SCAN |t4 |11 |5 | +|15| │ │ └─TABLE FULL SCAN |t6 |11 |5 | |16| │ └─TABLE FULL SCAN |t5 |11 |5 | -|17| └─TABLE FULL SCAN |t6 |11 |5 | +|17| └─TABLE FULL SCAN |t4 |11 |5 | =============================================================== Outputs & filters: ------------------------------------- 0 - output([T_FUN_COUNT(*)], [T_FUN_SUM(t1.c1 + t5.c1 + t8.c2 * t9.c1 - t3.c1 * 4)]), filter(nil), rowset=16 group(nil), agg_func([T_FUN_COUNT(*)], [T_FUN_SUM(t1.c1 + t5.c1 + t8.c2 * t9.c1 - t3.c1 * 4)]) 1 - output([t1.c1], [t5.c1], [t9.c1], [t8.c2], [t3.c1]), filter(nil), rowset=16 - equal_conds([t1.c1 = t6.c1]), other_conds(nil) + equal_conds([t1.c1 = t4.c1]), other_conds(nil) 2 - output([t1.c1], [t5.c1], [t9.c1], [t8.c2], [t3.c1]), filter(nil), rowset=16 equal_conds([t1.c1 = t5.c1]), other_conds(nil) 3 - output([t1.c1], [t9.c1], [t8.c2], [t3.c1]), filter(nil), rowset=16 - equal_conds([t1.c1 = t4.c1]), other_conds(nil) + equal_conds([t1.c1 = t6.c1]), other_conds(nil) 4 - output([t1.c1], [t9.c1], [t8.c2], [t3.c1]), filter(nil), rowset=16 equal_conds([t1.c1 = t3.c2]), other_conds(nil) 5 - output([t1.c1], [t9.c1], [t8.c2]), filter(nil), rowset=16 @@ -2346,18 +2347,18 @@ Outputs & filters: access([t3.c2], [t3.c1]), partitions(p0) is_index_back=false, is_global_index=false, filter_before_indexback[false], range_key([t3.__pk_increment]), range(MIN ; MAX)always true - 15 - output([t4.c1]), filter(nil), rowset=16 - access([t4.c1]), partitions(p0) + 15 - output([t6.c1]), filter(nil), rowset=16 + access([t6.c1]), partitions(p0) is_index_back=false, is_global_index=false, - range_key([t4.__pk_increment]), range(MIN ; MAX)always true + range_key([t6.__pk_increment]), range(MIN ; MAX)always true 16 - output([t5.c1]), filter(nil), rowset=16 access([t5.c1]), partitions(p0) is_index_back=false, is_global_index=false, range_key([t5.__pk_increment]), range(MIN ; MAX)always true - 17 - output([t6.c1]), filter(nil), rowset=16 - access([t6.c1]), partitions(p0) + 17 - output([t4.c1]), filter(nil), rowset=16 + access([t4.c1]), partitions(p0) is_index_back=false, is_global_index=false, - range_key([t6.__pk_increment]), range(MIN ; MAX)always true + range_key([t4.__pk_increment]), range(MIN ; MAX)always true select /*+ leading(t2 (t7, t1 (t8, t9))) */ count(*) , sum(t1.c1+t5.c1+t8.c2*t9.c1-t3.c1*4) from nn1 t1, nn1 t2, nn1 t3, nn1 t4, nn1 t5, nn1 t6 , nn1 t7, nn1 t8, nn1 t9 where t1.c1 = t2.c1 and t1.c1=t3.c2 and t2.c1 = t3.c1 and t3.c1 = t4.c1 and t4.c1 = t5.c1 and t5.c1 = t6.c1 AND diff --git a/tools/deploy/mysql_test/test_suite/optimizer/r/mysql/equal_set_mysql.result b/tools/deploy/mysql_test/test_suite/optimizer/r/mysql/equal_set_mysql.result index f1f4b39323..35f7cdbafb 100644 --- a/tools/deploy/mysql_test/test_suite/optimizer/r/mysql/equal_set_mysql.result +++ b/tools/deploy/mysql_test/test_suite/optimizer/r/mysql/equal_set_mysql.result @@ -561,7 +561,7 @@ Query Plan Outputs & filters: ------------------------------------- 0 - output([t1.a], [t1.b], [t1.c], [t1.d], [t2.a], [t2.b], [t2.c], [t2.d], [t3.a], [t3.b], [t3.c], [t3.d]), filter(nil), rowset=16 - equal_conds([t1.b = t3.b], [t1.c = t3.c]), other_conds(nil) + equal_conds([t1.b = t3.b], [t2.c = t3.c]), other_conds(nil) merge_directions([ASC], [ASC]) 1 - output([t1.a], [t1.b], [t1.c], [t1.d], [t2.a], [t2.b], [t2.c], [t2.d]), filter(nil), rowset=16 equal_conds([t1.b = t2.b], [t1.c = t2.c]), other_conds(nil) @@ -596,7 +596,7 @@ Outputs & filters: 0 - output([t1.a], [t1.b], [t1.c], [t1.d], [t2.a], [t2.b], [t2.c], [t2.d], [t3.a], [t3.b], [t3.c], [t3.d]), filter(nil), rowset=16 group([t1.b], [t1.c], [t2.b], [t2.c], [t3.b], [t3.c]), agg_func(nil) 1 - output([t1.b], [t1.c], [t2.b], [t2.c], [t3.b], [t3.c], [t1.a], [t1.d], [t2.a], [t2.d], [t3.a], [t3.d]), filter(nil), rowset=16 - equal_conds([t1.b = t3.b], [t1.c = t3.c]), other_conds(nil) + equal_conds([t1.b = t3.b], [t2.c = t3.c]), other_conds(nil) merge_directions([ASC], [ASC]) 2 - output([t1.b], [t1.c], [t2.b], [t2.c], [t1.a], [t1.d], [t2.a], [t2.d]), filter(nil), rowset=16 equal_conds([t1.b = t2.b], [t1.c = t2.c]), other_conds(nil) @@ -695,7 +695,7 @@ Query Plan Outputs & filters: ------------------------------------- 0 - output([t1.a], [t1.b], [t1.c], [t1.d], [t2.a], [t2.b], [t2.c], [t2.d], [t3.a], [t3.b], [t3.c], [t3.d]), filter(nil), rowset=16 - equal_conds([t1.b = t3.b], [t1.c = t3.c]), other_conds(nil) + equal_conds([t1.b = t3.b], [t2.c = t3.c]), other_conds(nil) merge_directions([ASC], [ASC]) 1 - output([t1.a], [t1.b], [t1.c], [t1.d], [t2.a], [t2.b], [t2.c], [t2.d]), filter(nil), rowset=16 equal_conds([t1.b = t2.b], [t1.c = t2.c]), other_conds(nil) @@ -730,7 +730,7 @@ Outputs & filters: 0 - output([t1.a], [t1.b], [t1.c], [t1.d], [t2.a], [t2.b], [t2.c], [t2.d], [t3.a], [t3.b], [t3.c], [t3.d]), filter(nil), rowset=16 group([t1.b], [t1.c], [t2.b], [t3.b], [t2.c], [t3.c]), agg_func(nil) 1 - output([t1.b], [t1.c], [t2.b], [t3.b], [t2.c], [t3.c], [t1.a], [t1.d], [t2.a], [t2.d], [t3.a], [t3.d]), filter(nil), rowset=16 - equal_conds([t1.b = t3.b], [t1.c = t3.c]), other_conds(nil) + equal_conds([t1.b = t3.b], [t2.c = t3.c]), other_conds(nil) merge_directions([ASC], [ASC]) 2 - output([t1.b], [t1.c], [t2.b], [t2.c], [t1.a], [t1.d], [t2.a], [t2.d]), filter(nil), rowset=16 equal_conds([t1.b = t2.b], [t1.c = t2.c]), other_conds(nil) @@ -4597,12 +4597,12 @@ Outputs & filters: 0 - output([INTERNAL_FUNCTION(t1.a, t1.b, t2.a, t2.b, t3.a, t3.b)]), filter(nil), rowset=16 1 - output([INTERNAL_FUNCTION(t1.a, t1.b, t2.a, t2.b, t3.a, t3.b)]), filter(nil), rowset=16 dop=1 - 2 - output([t1.a], [t3.a], [t1.b], [t3.b], [t2.a], [t2.b]), filter(nil), rowset=16 + 2 - output([t1.a], [t3.a], [t2.b], [t3.b], [t2.a], [t1.b]), filter(nil), rowset=16 partition wise, force partition granule - 3 - output([t1.a], [t3.a], [t1.b], [t3.b], [t2.a], [t2.b]), filter(nil), rowset=16 - equal_conds([t1.a = t3.a], [t1.b = t3.b]), other_conds(nil) + 3 - output([t1.a], [t3.a], [t2.b], [t3.b], [t2.a], [t1.b]), filter(nil), rowset=16 + equal_conds([t1.a = t3.a], [t2.b = t3.b]), other_conds(nil) merge_directions([ASC], [ASC]) - 4 - output([t1.a], [t1.b], [t2.a], [t2.b]), filter(nil), rowset=16 + 4 - output([t1.a], [t2.b], [t2.a], [t1.b]), filter(nil), rowset=16 equal_conds([t1.a = t2.a], [t1.b = t2.b]), other_conds(nil) merge_directions([ASC], [ASC]) 5 - output([t1.a], [t1.b]), filter(nil), rowset=16 @@ -5083,12 +5083,12 @@ Outputs & filters: 0 - output([INTERNAL_FUNCTION(t1.a, t1.b, t2.a, t2.b, t3.a, t3.b)]), filter(nil), rowset=16 1 - output([INTERNAL_FUNCTION(t1.a, t1.b, t2.a, t2.b, t3.a, t3.b)]), filter(nil), rowset=16 dop=1 - 2 - output([t3.a], [t1.a], [t3.b], [t1.b], [t2.a], [t2.b]), filter(nil), rowset=16 + 2 - output([t3.a], [t1.a], [t2.b], [t3.b], [t2.a], [t1.b]), filter(nil), rowset=16 partition wise, force partition granule - 3 - output([t3.a], [t1.a], [t3.b], [t1.b], [t2.a], [t2.b]), filter(nil), rowset=16 - equal_conds([t3.a = t1.a], [t3.b = t1.b]), other_conds(nil) + 3 - output([t3.a], [t1.a], [t2.b], [t3.b], [t2.a], [t1.b]), filter(nil), rowset=16 + equal_conds([t3.a = t1.a], [t2.b = t3.b]), other_conds(nil) merge_directions([ASC], [ASC]) - 4 - output([t1.a], [t1.b], [t2.a], [t2.b]), filter(nil), rowset=16 + 4 - output([t1.a], [t2.b], [t2.a], [t1.b]), filter(nil), rowset=16 equal_conds([t1.a = t2.a], [t1.b = t2.b]), other_conds(nil) merge_directions([ASC], [ASC]) 5 - output([t1.a], [t1.b]), filter(nil), rowset=16 @@ -5295,10 +5295,10 @@ Query Plan |1 |└─EXCHANGE OUT DISTR |:EX10000|1 |47 | |2 | └─PX PARTITION ITERATOR| |1 |46 | |3 | └─MERGE JOIN | |1 |46 | -|4 | ├─TABLE FULL SCAN |t3 |1 |16 | -|5 | └─MERGE JOIN | |1 |31 | -|6 | ├─TABLE FULL SCAN|t1 |1 |16 | -|7 | └─TABLE FULL SCAN|t2 |1 |16 | +|4 | ├─MERGE JOIN | |1 |31 | +|5 | │ ├─TABLE FULL SCAN|t1 |1 |16 | +|6 | │ └─TABLE FULL SCAN|t2 |1 |16 | +|7 | └─TABLE FULL SCAN |t3 |1 |16 | ============================================================= Outputs & filters: ------------------------------------- @@ -5310,21 +5310,21 @@ Outputs & filters: 3 - output([t1.a], [t1.b]), filter(nil), rowset=16 equal_conds([t1.a = t3.a], [t1.b = t3.b]), other_conds(nil) merge_directions([ASC], [ASC]) - 4 - output([t3.a], [t3.b]), filter(nil), rowset=16 - access([t3.a], [t3.b]), partitions(p0sp[0-1], p1sp[0-1]) - is_index_back=false, is_global_index=false, - range_key([t3.a], [t3.b]), range(MIN,MIN ; MAX,MAX)always true - 5 - output([t1.a], [t1.b]), filter(nil), rowset=16 + 4 - output([t1.a], [t1.b]), filter(nil), rowset=16 equal_conds([t1.a = t2.a], [t1.b = t2.b]), other_conds(nil) merge_directions([ASC], [ASC]) - 6 - output([t1.a], [t1.b]), filter(nil), rowset=16 + 5 - output([t1.a], [t1.b]), filter(nil), rowset=16 access([t1.a], [t1.b]), partitions(p0sp[0-1], p1sp[0-1]) is_index_back=false, is_global_index=false, range_key([t1.a], [t1.b]), range(MIN,MIN ; MAX,MAX)always true - 7 - output([t2.a], [t2.b]), filter(nil), rowset=16 + 6 - output([t2.a], [t2.b]), filter(nil), rowset=16 access([t2.a], [t2.b]), partitions(p0sp[0-1], p1sp[0-1]) is_index_back=false, is_global_index=false, range_key([t2.a], [t2.b]), range(MIN,MIN ; MAX,MAX)always true + 7 - output([t3.a], [t3.b]), filter(nil), rowset=16 + access([t3.a], [t3.b]), partitions(p0sp[0-1], p1sp[0-1]) + is_index_back=false, is_global_index=false, + range_key([t3.a], [t3.b]), range(MIN,MIN ; MAX,MAX)always true explain select * from t1 where (t1.a, t1.b) in (select t2.a, t2.b from t2 where (t2.a, t2.b) in (select t3.a, t3.b from t3)); Query Plan ============================================================= @@ -5347,13 +5347,13 @@ Outputs & filters: 2 - output([t1.a], [t1.b]), filter(nil), rowset=16 partition wise, force partition granule 3 - output([t1.a], [t1.b]), filter(nil), rowset=16 - equal_conds([t1.a = t3.a], [t1.b = t3.b]), other_conds(nil) + equal_conds([t1.a = t3.a], [t2.b = t3.b]), other_conds(nil) merge_directions([ASC], [ASC]) 4 - output([t3.a], [t3.b]), filter(nil), rowset=16 access([t3.a], [t3.b]), partitions(p0sp[0-1], p1sp[0-1]) is_index_back=false, is_global_index=false, range_key([t3.a], [t3.b]), range(MIN,MIN ; MAX,MAX)always true - 5 - output([t1.a], [t1.b]), filter(nil), rowset=16 + 5 - output([t1.a], [t1.b], [t2.b]), filter(nil), rowset=16 equal_conds([t1.a = t2.a], [t1.b = t2.b]), other_conds(nil) merge_directions([ASC], [ASC]) 6 - output([t1.a], [t1.b]), filter(nil), rowset=16 @@ -5438,11 +5438,11 @@ Outputs & filters: 0 - output([INTERNAL_FUNCTION(t1.a, t1.b, t1.c, t1.d, t2.a, t2.b, t2.c, t2.d, t3.a, t3.b, t3.c, t3.d)]), filter(nil), rowset=16 1 - output([INTERNAL_FUNCTION(t1.a, t1.b, t1.c, t1.d, t2.a, t2.b, t2.c, t2.d, t3.a, t3.b, t3.c, t3.d)]), filter(nil), rowset=16 dop=1 - 2 - output([t1.a], [t1.b], [t1.c], [t1.d], [t2.a], [t2.b], [t2.c], [t2.d], [t3.a], [t3.b], [t3.c], [t3.d]), filter(nil), rowset=16 + 2 - output([t1.a], [t2.b], [t1.b], [t1.c], [t1.d], [t2.a], [t2.c], [t2.d], [t3.a], [t3.b], [t3.c], [t3.d]), filter(nil), rowset=16 partition wise, force partition granule - 3 - output([t1.a], [t1.b], [t1.c], [t1.d], [t2.a], [t2.b], [t2.c], [t2.d], [t3.a], [t3.b], [t3.c], [t3.d]), filter(nil), rowset=16 - conds(nil), nl_params_([t1.a(:2)], [t1.b(:3)]), use_batch=false - 4 - output([t1.a], [t1.b], [t1.c], [t1.d], [t2.a], [t2.b], [t2.c], [t2.d]), filter(nil), rowset=16 + 3 - output([t1.a], [t2.b], [t1.b], [t1.c], [t1.d], [t2.a], [t2.c], [t2.d], [t3.a], [t3.b], [t3.c], [t3.d]), filter(nil), rowset=16 + conds(nil), nl_params_([t1.a(:2)], [t2.b(:3)]), use_batch=false + 4 - output([t1.a], [t2.b], [t1.b], [t1.c], [t1.d], [t2.a], [t2.c], [t2.d]), filter(nil), rowset=16 conds(nil), nl_params_([t1.a(:0)], [t1.b(:1)]), use_batch=false 5 - output([t1.a], [t1.b], [t1.c], [t1.d]), filter(nil), rowset=16 access([t1.a], [t1.b], [t1.c], [t1.d]), partitions(p0sp[0-4], p1sp[0-4], p2sp[0-4], p3sp[0-4], p4sp[0-4]) @@ -5925,11 +5925,11 @@ Outputs & filters: 0 - output([INTERNAL_FUNCTION(t1.a, t1.b, t1.c, t1.d, t2.a, t2.b, t2.c, t2.d, t3.a, t3.b, t3.c, t3.d)]), filter(nil), rowset=16 1 - output([INTERNAL_FUNCTION(t1.a, t1.b, t1.c, t1.d, t2.a, t2.b, t2.c, t2.d, t3.a, t3.b, t3.c, t3.d)]), filter(nil), rowset=16 dop=1 - 2 - output([t1.a], [t1.b], [t1.c], [t1.d], [t2.a], [t2.b], [t2.c], [t2.d], [t3.a], [t3.b], [t3.c], [t3.d]), filter(nil), rowset=16 + 2 - output([t1.a], [t2.b], [t1.b], [t1.c], [t1.d], [t2.a], [t2.c], [t2.d], [t3.a], [t3.b], [t3.c], [t3.d]), filter(nil), rowset=16 partition wise, force partition granule - 3 - output([t1.a], [t1.b], [t1.c], [t1.d], [t2.a], [t2.b], [t2.c], [t2.d], [t3.a], [t3.b], [t3.c], [t3.d]), filter(nil), rowset=16 - conds(nil), nl_params_([t1.a(:2)], [t1.b(:3)]), use_batch=false - 4 - output([t1.a], [t1.b], [t1.c], [t1.d], [t2.a], [t2.b], [t2.c], [t2.d]), filter(nil), rowset=16 + 3 - output([t1.a], [t2.b], [t1.b], [t1.c], [t1.d], [t2.a], [t2.c], [t2.d], [t3.a], [t3.b], [t3.c], [t3.d]), filter(nil), rowset=16 + conds(nil), nl_params_([t1.a(:2)], [t2.b(:3)]), use_batch=false + 4 - output([t1.a], [t2.b], [t1.b], [t1.c], [t1.d], [t2.a], [t2.c], [t2.d]), filter(nil), rowset=16 conds(nil), nl_params_([t1.a(:0)], [t1.b(:1)]), use_batch=false 5 - output([t1.a], [t1.b], [t1.c], [t1.d]), filter(nil), rowset=16 access([t1.a], [t1.b], [t1.c], [t1.d]), partitions(p0sp[0-4], p1sp[0-4], p2sp[0-4], p3sp[0-4], p4sp[0-4]) @@ -5944,7 +5944,7 @@ Outputs & filters: access([t3.a], [t3.b], [t3.c], [t3.d]), partitions(p0sp[0-4], p1sp[0-4], p2sp[0-4], p3sp[0-4], p4sp[0-4]) is_index_back=false, is_global_index=false, range_key([t3.a], [t3.b], [t3.c]), range(MIN ; MAX), - range_cond([t3.a = :2], [t3.b = :3]) + range_cond([t3.a = :2], [:3 = t3.b]) explain select/*+leading(t1,t2,t3)*/ * from t1 full join t2 on t1.a = t2.a and t1.b = t2.b inner join t3 on t1.a = t3.a and t1.b = t3.b; Query Plan =================================================================== diff --git a/tools/deploy/mysql_test/test_suite/subquery/r/mysql/subquery_sj_innodb.result b/tools/deploy/mysql_test/test_suite/subquery/r/mysql/subquery_sj_innodb.result index 339a133b62..dcc9baf270 100644 --- a/tools/deploy/mysql_test/test_suite/subquery/r/mysql/subquery_sj_innodb.result +++ b/tools/deploy/mysql_test/test_suite/subquery/r/mysql/subquery_sj_innodb.result @@ -204,7 +204,7 @@ Query Plan |1 |├─NESTED-LOOP JOIN CARTESIAN | |1 |8 | |2 |│ ├─TABLE FULL SCAN |t2 |1 |4 | |3 |│ └─MATERIAL | |1 |4 | -|4 |│ └─SUBPLAN SCAN |VIEW3|1 |4 | +|4 |│ └─SUBPLAN SCAN |VIEW1|1 |4 | |5 |│ └─TABLE FULL SCAN |t3 |1 |4 | |6 |└─TABLE FULL SCAN |t2 |1 |4 | ============================================================== @@ -214,7 +214,7 @@ Outputs & filters: equal_conds([cast(t2.c1, VARCHAR(1048576)) = cast(cast(t2.c6, CHAR(1)), VARCHAR(1048576))]), other_conds(nil) 1 - output([t2.c1]), filter(nil), rowset=16 conds(nil), nl_params_(nil), use_batch=false - 2 - output([t2.c1]), filter([cast(t2.c2, DECIMAL(-1, -1)) = cast(1, DECIMAL(1, 0))]), rowset=16 + 2 - output([t2.c1]), filter([cast(1, DECIMAL(1, 0)) = cast(t2.c2, DECIMAL(-1, -1))]), rowset=16 access([t2.c2], [t2.c1]), partitions(p0) is_index_back=false, is_global_index=false, filter_before_indexback[false], range_key([t2.__pk_increment]), range(MIN ; MAX)always true diff --git a/tools/deploy/mysql_test/test_suite/with_clause_mysql/r/mysql/dis_recursive_mysql.result b/tools/deploy/mysql_test/test_suite/with_clause_mysql/r/mysql/dis_recursive_mysql.result index f519149dcf..d2bdf7ef04 100644 --- a/tools/deploy/mysql_test/test_suite/with_clause_mysql/r/mysql/dis_recursive_mysql.result +++ b/tools/deploy/mysql_test/test_suite/with_clause_mysql/r/mysql/dis_recursive_mysql.result @@ -4804,17 +4804,17 @@ Query Plan ============================================================== |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| -------------------------------------------------------------- -|0 |SORT | |1126 |954 | -|1 |└─SUBPLAN SCAN |rw |1126 |606 | -|2 | └─RECURSIVE UNION ALL | |1126 |603 | +|0 |SORT | |1126 |950 | +|1 |└─SUBPLAN SCAN |rw |1126 |601 | +|2 | └─RECURSIVE UNION ALL | |1126 |598 | |3 | ├─HASH JOIN | |79 |26 | |4 | │ ├─HASH JOIN | |17 |13 | |5 | │ │ ├─TABLE FULL SCAN |e |5 |5 | |6 | │ │ └─TABLE FULL SCAN |n1 |17 |5 | |7 | │ └─TABLE FULL SCAN |n2 |17 |5 | -|8 | └─NESTED-LOOP SEMI JOIN | |1048 |575 | -|9 | ├─HASH JOIN | |3142 |159 | -|10| │ │ MATERIAL | |16 |19 | +|8 | └─NESTED-LOOP SEMI JOIN | |1048 |570 | +|9 | ├─HASH JOIN | |3142 |155 | +|10| │ │ MATERIAL | |16 |16 | |11| │ │ └─HASH JOIN | |16 |15 | |12| │ │ ├─TABLE FULL SCAN|n |17 |5 | |13| │ │ └─TABLE FULL SCAN|e |1 |5 | @@ -4920,18 +4920,18 @@ Query Plan ====================================================================== |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| ---------------------------------------------------------------------- -|0 |SORT | |1126 |1045 | -|1 |└─SUBPLAN SCAN |rw |1126 |697 | -|2 | └─RECURSIVE UNION ALL | |1126 |694 | +|0 |SORT | |1126 |1041 | +|1 |└─SUBPLAN SCAN |rw |1126 |692 | +|2 | └─RECURSIVE UNION ALL | |1126 |689 | |3 | ├─HASH JOIN | |79 |26 | |4 | │ ├─HASH JOIN | |17 |13 | |5 | │ │ ├─TABLE FULL SCAN |e |5 |5 | |6 | │ │ └─TABLE FULL SCAN |n1 |17 |5 | |7 | │ └─TABLE FULL SCAN |n2 |17 |5 | -|8 | └─NESTED-LOOP SEMI JOIN | |1048 |666 | -|9 | ├─NESTED-LOOP JOIN CARTESIAN | |3142 |250 | -|10| │ ├─HASH JOIN | |3142 |159 | -|11| │ │ │ MATERIAL | |16 |19 | +|8 | └─NESTED-LOOP SEMI JOIN | |1048 |661 | +|9 | ├─NESTED-LOOP JOIN CARTESIAN | |3142 |246 | +|10| │ ├─HASH JOIN | |3142 |155 | +|11| │ │ │ MATERIAL | |16 |17 | |12| │ │ │ └─HASH JOIN | |16 |15 | |13| │ │ │ ├─TABLE FULL SCAN |n |17 |5 | |14| │ │ │ └─TABLE FULL SCAN |e |1 |5 |