[CP] 修复normal join的计划稳定性问题

This commit is contained in:
zzg19950727
2024-07-01 09:46:29 +00:00
committed by ob-robot
parent b6efa3a2ca
commit cc12fa9bb8
5 changed files with 518 additions and 533 deletions

View File

@ -371,121 +371,118 @@ Outputs & filters:
range_cond([:0 = t2.c1])
explain select /*+use_nl(t1 t2)*/ * from t1 join t2 on t1.c2= t2.c2;
Query Plan
=======================================================================
|ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)|
-----------------------------------------------------------------------
|0 |PX COORDINATOR | |1 |8 |
|1 |└─EXCHANGE OUT DISTR |:EX10001|1 |7 |
|2 | └─NESTED-LOOP JOIN | |1 |5 |
|3 | ├─PX PARTITION ITERATOR | |1 |5 |
|4 | │ └─TABLE FULL SCAN |t1 |1 |5 |
|5 | └─MATERIAL | |1 |6 |
|6 | └─EXCHANGE IN DISTR | |1 |6 |
|7 | └─EXCHANGE OUT DISTR (PKEY)|:EX10000|1 |6 |
|8 | └─PX PARTITION ITERATOR | |1 |5 |
|9 | └─TABLE FULL SCAN |t2 |1 |5 |
=======================================================================
=====================================================================
|ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)|
---------------------------------------------------------------------
|0 |PX COORDINATOR | |1 |28 |
|1 |└─EXCHANGE OUT DISTR |:EX10001|1 |27 |
|2 | └─NESTED-LOOP JOIN | |1 |25 |
|3 | ├─EXCHANGE IN DISTR | |1 |6 |
|4 | │ └─EXCHANGE OUT DISTR (PKEY)|:EX10000|1 |6 |
|5 | │ └─PX PARTITION ITERATOR | |1 |5 |
|6 | │ └─TABLE FULL SCAN |t2 |1 |5 |
|7 | └─PX PARTITION ITERATOR | |1 |36 |
|8 | └─TABLE RANGE SCAN |t1 |1 |36 |
=====================================================================
Outputs & filters:
-------------------------------------
0 - output([INTERNAL_FUNCTION(t1.c1, t1.c2, t1.c3, t1.c4, t2.c1, t2.c2, t2.c3)]), filter(nil), rowset=16
1 - output([INTERNAL_FUNCTION(t1.c1, t1.c2, t1.c3, t1.c4, t2.c1, t2.c2, t2.c3)]), filter(nil), rowset=16
dop=1
2 - output([t1.c2], [t2.c2], [t1.c3], [t1.c1], [t1.c4], [t2.c1], [t2.c3]), filter(nil), rowset=16
conds([t1.c2 = t2.c2]), nl_params_(nil), use_batch=false
3 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16
affinitize, force partition granule
4 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16
access([t1.c2], [t1.c3], [t1.c1], [t1.c4]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
range_key([t1.c2], [t1.c3]), range(MIN,MIN ; MAX,MAX)always true
5 - output([t2.c2], [t2.c1], [t2.c3]), filter(nil), rowset=16
6 - output([t2.c2], [t2.c1], [t2.c3]), filter(nil), rowset=16
7 - output([t2.c2], [t2.c1], [t2.c3]), filter(nil), rowset=16
2 - output([t2.c2], [t2.c1], [t2.c3], [t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16
conds(nil), nl_params_([t2.c2(:0)]), use_batch=false
3 - output([PARTITION_ID], [t2.c2], [t2.c1], [t2.c3]), filter(nil), rowset=16
4 - output([PARTITION_ID], [t2.c2], [t2.c1], [t2.c3]), filter(nil), rowset=16
(#keys=1, [t2.c2]), dop=1
8 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
5 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
force partition granule
9 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
6 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
access([t2.c1], [t2.c2], [t2.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
range_key([t2.c1], [t2.c2], [t2.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
7 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16
affinitize, force partition granule
8 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16
access([t1.c2], [t1.c3], [t1.c1], [t1.c4]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
range_key([t1.c2], [t1.c3]), range(MIN ; MAX),
range_cond([t1.c2 = :0])
explain select /*+use_nl(t1 t2)*/ * from t1 join t2 on t1.c1= t2.c1;
Query Plan
=======================================================================
|ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)|
-----------------------------------------------------------------------
|0 |PX COORDINATOR | |1 |8 |
|1 |└─EXCHANGE OUT DISTR |:EX10001|1 |7 |
|2 | └─NESTED-LOOP JOIN | |1 |5 |
|3 | ├─PX PARTITION ITERATOR | |1 |5 |
|4 | │ └─TABLE FULL SCAN |t2 |1 |5 |
|5 | └─MATERIAL | |1 |7 |
|6 | └─EXCHANGE IN DISTR | |1 |7 |
|7 | └─EXCHANGE OUT DISTR (PKEY)|:EX10000|1 |6 |
|8 | └─PX PARTITION ITERATOR | |1 |5 |
|9 | └─TABLE FULL SCAN |t1 |1 |5 |
=======================================================================
=====================================================================
|ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)|
---------------------------------------------------------------------
|0 |PX COORDINATOR | |1 |29 |
|1 |└─EXCHANGE OUT DISTR |:EX10001|1 |28 |
|2 | └─NESTED-LOOP JOIN | |1 |25 |
|3 | ├─EXCHANGE IN DISTR | |1 |7 |
|4 | │ └─EXCHANGE OUT DISTR (PKEY)|:EX10000|1 |6 |
|5 | │ └─PX PARTITION ITERATOR | |1 |5 |
|6 | │ └─TABLE FULL SCAN |t1 |1 |5 |
|7 | └─PX PARTITION ITERATOR | |1 |36 |
|8 | └─TABLE RANGE SCAN |t2 |1 |36 |
=====================================================================
Outputs & filters:
-------------------------------------
0 - output([INTERNAL_FUNCTION(t1.c1, t1.c2, t1.c3, t1.c4, t2.c1, t2.c2, t2.c3)]), filter(nil), rowset=16
1 - output([INTERNAL_FUNCTION(t1.c1, t1.c2, t1.c3, t1.c4, t2.c1, t2.c2, t2.c3)]), filter(nil), rowset=16
dop=1
2 - output([t1.c1], [t2.c1], [t2.c2], [t2.c3], [t1.c2], [t1.c3], [t1.c4]), filter(nil), rowset=16
conds([t1.c1 = t2.c1]), nl_params_(nil), use_batch=false
3 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
affinitize, force partition granule
4 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
access([t2.c1], [t2.c2], [t2.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
range_key([t2.c1], [t2.c2], [t2.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
5 - output([t1.c1], [t1.c2], [t1.c3], [t1.c4]), filter(nil), rowset=16
6 - output([t1.c1], [t1.c2], [t1.c3], [t1.c4]), filter(nil), rowset=16
7 - output([t1.c1], [t1.c2], [t1.c3], [t1.c4]), filter(nil), rowset=16
2 - output([t1.c1], [t1.c2], [t1.c3], [t1.c4], [t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
conds(nil), nl_params_([t1.c1(:0)]), use_batch=false
3 - output([PARTITION_ID], [t1.c1], [t1.c2], [t1.c3], [t1.c4]), filter(nil), rowset=16
4 - output([PARTITION_ID], [t1.c1], [t1.c2], [t1.c3], [t1.c4]), filter(nil), rowset=16
(#keys=1, [t1.c1]), dop=1
8 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16
5 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16
force partition granule
9 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16
6 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16
access([t1.c2], [t1.c3], [t1.c1], [t1.c4]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
range_key([t1.c2], [t1.c3]), range(MIN,MIN ; MAX,MAX)always true
7 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
affinitize, force partition granule
8 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
access([t2.c1], [t2.c2], [t2.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
range_key([t2.c1], [t2.c2], [t2.c3]), range(MIN ; MAX),
range_cond([:0 = t2.c1])
explain select /*+use_nl(t1 t2)*/ * from t1 join t2 on t1.c2= t2.c2 and t1.c3= t2.c3;
Query Plan
=======================================================================
|ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)|
-----------------------------------------------------------------------
|0 |PX COORDINATOR | |1 |8 |
|1 |└─EXCHANGE OUT DISTR |:EX10001|1 |7 |
|2 | └─NESTED-LOOP JOIN | |1 |5 |
|3 | ├─PX PARTITION ITERATOR | |1 |5 |
|4 | │ └─TABLE FULL SCAN |t1 |1 |5 |
|5 | └─MATERIAL | |1 |6 |
|6 | └─EXCHANGE IN DISTR | |1 |6 |
|7 | └─EXCHANGE OUT DISTR (PKEY)|:EX10000|1 |6 |
|8 | └─PX PARTITION ITERATOR | |1 |5 |
|9 | └─TABLE FULL SCAN |t2 |1 |5 |
=======================================================================
=====================================================================
|ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)|
---------------------------------------------------------------------
|0 |PX COORDINATOR | |1 |28 |
|1 |└─EXCHANGE OUT DISTR |:EX10001|1 |27 |
|2 | └─NESTED-LOOP JOIN | |1 |25 |
|3 | ├─EXCHANGE IN DISTR | |1 |6 |
|4 | │ └─EXCHANGE OUT DISTR (PKEY)|:EX10000|1 |6 |
|5 | │ └─PX PARTITION ITERATOR | |1 |5 |
|6 | │ └─TABLE FULL SCAN |t2 |1 |5 |
|7 | └─PX PARTITION ITERATOR | |1 |36 |
|8 | └─TABLE GET |t1 |1 |36 |
=====================================================================
Outputs & filters:
-------------------------------------
0 - output([INTERNAL_FUNCTION(t1.c1, t1.c2, t1.c3, t1.c4, t2.c1, t2.c2, t2.c3)]), filter(nil), rowset=16
1 - output([INTERNAL_FUNCTION(t1.c1, t1.c2, t1.c3, t1.c4, t2.c1, t2.c2, t2.c3)]), filter(nil), rowset=16
dop=1
2 - output([t1.c2], [t2.c2], [t1.c3], [t2.c3], [t1.c1], [t1.c4], [t2.c1]), filter(nil), rowset=16
conds([t1.c2 = t2.c2], [t1.c3 = t2.c3]), nl_params_(nil), use_batch=false
3 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16
affinitize, force partition granule
4 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16
access([t1.c2], [t1.c3], [t1.c1], [t1.c4]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
range_key([t1.c2], [t1.c3]), range(MIN,MIN ; MAX,MAX)always true
5 - output([t2.c2], [t2.c3], [t2.c1]), filter(nil), rowset=16
6 - output([t2.c2], [t2.c3], [t2.c1]), filter(nil), rowset=16
7 - output([t2.c2], [t2.c3], [t2.c1]), filter(nil), rowset=16
2 - output([t2.c2], [t2.c3], [t2.c1], [t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16
conds(nil), nl_params_([t2.c2(:0)], [t2.c3(:1)]), use_batch=false
3 - output([PARTITION_ID], [t2.c2], [t2.c3], [t2.c1]), filter(nil), rowset=16
4 - output([PARTITION_ID], [t2.c2], [t2.c3], [t2.c1]), filter(nil), rowset=16
(#keys=1, [t2.c2]), dop=1
8 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
5 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
force partition granule
9 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
6 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
access([t2.c1], [t2.c2], [t2.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
range_key([t2.c1], [t2.c2], [t2.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
7 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16
affinitize, force partition granule
8 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16
access([t1.c2], [t1.c3], [t1.c1], [t1.c4]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
range_key([t1.c2], [t1.c3]), range(MIN ; MAX),
range_cond([t1.c2 = :0], [t1.c3 = :1])
explain select c1 from t11 where c2 not in (select c2 from t11);
Query Plan
===============================================================
@ -1219,103 +1216,98 @@ Outputs & filters:
range_key([t4.c1], [t4.c2], [t4.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
explain select /*+use_nl(a b) use_nl(b c)*/ * from (select c1, c3, sum(c2) as yyy, max(c4) from t4 group by c3 order by yyy limit 1) as a join t5 as b on a.c1 = b.c1 and a.c3 = b.c3 join t6 as c on b.c1=c.c1 and b.c3 = c.c3;
Query Plan
==================================================================================
|ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)|
----------------------------------------------------------------------------------
|0 |PX COORDINATOR | |1 |20 |
|1 |└─EXCHANGE OUT DISTR |:EX10002|1 |18 |
|2 | └─HASH JOIN | |1 |14 |
|3 | ├─PX PARTITION ITERATOR | |1 |7 |
|4 | │ └─TABLE FULL SCAN |c |1 |7 |
|5 | └─NESTED-LOOP JOIN | |1 |7 |
|6 | ├─PX PARTITION ITERATOR | |1 |7 |
|7 | │ └─TABLE FULL SCAN |b |1 |7 |
|8 | └─MATERIAL | |1 |12 |
|9 | └─EXCHANGE IN DISTR | |1 |12 |
|10| └─EXCHANGE OUT DISTR (PKEY) |:EX10001|1 |11 |
|11| └─SUBPLAN SCAN |a |1 |10 |
|12| └─LIMIT | |1 |10 |
|13| └─EXCHANGE IN MERGE SORT DISTR| |1 |10 |
|14| └─EXCHANGE OUT DISTR |:EX10000|1 |9 |
|15| └─TOP-N SORT | |1 |7 |
|16| └─PX PARTITION ITERATOR | |1 |7 |
|17| └─HASH GROUP BY | |1 |7 |
|18| └─TABLE FULL SCAN |t4 |1 |7 |
==================================================================================
==============================================================================
|ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)|
------------------------------------------------------------------------------
|0 |PX COORDINATOR | |1 |41 |
|1 |└─EXCHANGE OUT DISTR |:EX10002|1 |39 |
|2 | └─HASH JOIN | |1 |35 |
|3 | ├─EXCHANGE IN DISTR | |1 |12 |
|4 | │ └─EXCHANGE OUT DISTR (PKEY) |:EX10001|1 |11 |
|5 | │ └─SUBPLAN SCAN |a |1 |10 |
|6 | │ └─LIMIT | |1 |10 |
|7 | └─EXCHANGE IN MERGE SORT DISTR| |1 |10 |
|8 | └─EXCHANGE OUT DISTR |:EX10000|1 |9 |
|9 | └─TOP-N SORT | |1 |7 |
|10| └─PX PARTITION ITERATOR | |1 |7 |
|11| │ └─HASH GROUP BY | |1 |7 |
|12| │ └─TABLE FULL SCAN |t4 |1 |7 |
|13| └─PX PARTITION ITERATOR | |1 |23 |
|14| └─NESTED-LOOP JOIN | |1 |23 |
|15| ├─TABLE FULL SCAN |b |1 |7 |
|16| └─TABLE RANGE SCAN |c |1 |46 |
==============================================================================
Outputs & filters:
-------------------------------------
0 - output([INTERNAL_FUNCTION(a.c1, a.c3, a.yyy, a.max(c4), b.c1, b.c2, b.c3, b.c4, c.c1, c.c2, c.c3, c.c4)]), filter(nil), rowset=16
1 - output([INTERNAL_FUNCTION(a.c1, a.c3, a.yyy, a.max(c4), b.c1, b.c2, b.c3, b.c4, c.c1, c.c2, c.c3, c.c4)]), filter(nil), rowset=16
dop=1
2 - output([c.c1], [a.c1], [b.c3], [c.c3], [c.c2], [c.c4], [b.c1], [a.c3], [b.c2], [b.c4], [a.yyy], [a.max(c4)]), filter(nil), rowset=16
equal_conds([c.c1 = a.c1], [b.c3 = c.c3]), other_conds(nil)
3 - output([c.c1], [c.c2], [c.c3], [c.c4]), filter(nil), rowset=16
affinitize, partition wise, force partition granule
4 - output([c.c1], [c.c2], [c.c3], [c.c4]), filter(nil), rowset=16
access([c.c1], [c.c2], [c.c3], [c.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
range_key([c.c1], [c.c2], [c.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
5 - output([a.c1], [b.c3], [b.c1], [a.c3], [b.c2], [b.c4], [a.yyy], [a.max(c4)]), filter(nil), rowset=16
conds([a.c1 = b.c1], [a.c3 = b.c3]), nl_params_(nil), use_batch=false
6 - output([b.c1], [b.c2], [b.c3], [b.c4]), filter(nil), rowset=16
affinitize, partition wise, force partition granule
7 - output([b.c1], [b.c2], [b.c3], [b.c4]), filter(nil), rowset=16
access([b.c1], [b.c2], [b.c3], [b.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
range_key([b.c1], [b.c2], [b.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
8 - output([a.c1], [a.c3], [a.yyy], [a.max(c4)]), filter(nil), rowset=16
9 - output([a.c1], [a.c3], [a.yyy], [a.max(c4)]), filter(nil), rowset=16
10 - output([a.c1], [a.c3], [a.yyy], [a.max(c4)]), filter(nil), rowset=16
2 - output([a.c1], [b.c1], [a.c3], [b.c3], [a.yyy], [a.max(c4)], [b.c2], [b.c4], [c.c1], [c.c2], [c.c3], [c.c4]), filter(nil), rowset=16
equal_conds([a.c1 = b.c1], [a.c3 = b.c3]), other_conds(nil)
3 - output([a.c1], [a.c3], [a.yyy], [a.max(c4)]), filter(nil), rowset=16
4 - output([a.c1], [a.c3], [a.yyy], [a.max(c4)]), filter(nil), rowset=16
(#keys=1, [a.c3]), is_single, dop=1
11 - output([a.c1], [a.c3], [a.yyy], [a.max(c4)]), filter(nil), rowset=16
5 - output([a.c1], [a.c3], [a.yyy], [a.max(c4)]), filter(nil), rowset=16
access([a.c1], [a.c3], [a.yyy], [a.max(c4)])
12 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
6 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
limit(1), offset(nil)
13 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
7 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
sort_keys([T_FUN_SUM(t4.c2), ASC])
14 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
8 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
dop=1
15 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
9 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
sort_keys([T_FUN_SUM(t4.c2), ASC]), topn(1)
16 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
10 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
partition wise, force partition granule
17 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
11 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
group([t4.c3]), agg_func([T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)])
18 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter(nil), rowset=16
12 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter(nil), rowset=16
access([t4.c1], [t4.c2], [t4.c3], [t4.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
range_key([t4.c1], [t4.c2], [t4.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
13 - output([b.c1], [b.c3], [b.c2], [b.c4], [c.c1], [c.c2], [c.c3], [c.c4]), filter(nil), rowset=16
affinitize, partition wise, force partition granule
14 - output([b.c1], [b.c3], [b.c2], [b.c4], [c.c1], [c.c2], [c.c3], [c.c4]), filter(nil), rowset=16
conds(nil), nl_params_([b.c1(:0)], [b.c3(:1)]), use_batch=true
15 - output([b.c1], [b.c2], [b.c3], [b.c4]), filter(nil), rowset=16
access([b.c1], [b.c2], [b.c3], [b.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
range_key([b.c1], [b.c2], [b.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
16 - output([c.c1], [c.c2], [c.c3], [c.c4]), filter([:1 = c.c3]), rowset=16
access([GROUP_ID], [c.c1], [c.c2], [c.c3], [c.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([c.c1], [c.c2], [c.c3]), range(MIN ; MAX),
range_cond([:0 = c.c1])
explain select /*+use_nl(a b) use_nl(b c)*/ * from t5 as a join (select c1, c3, sum(c2) as yyy, max(c4) from t4 group by c3 order by yyy limit 1) as b on a.c1 = b.c1 and a.c3 = b.c3 join t6 as c on b.c1=c.c1 and b.c3 = c.c3;
Query Plan
==================================================================================
|ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)|
----------------------------------------------------------------------------------
|0 |PX COORDINATOR | |1 |20 |
|1 |└─EXCHANGE OUT DISTR |:EX10002|1 |18 |
|2 | └─HASH JOIN | |1 |14 |
|3 | ├─PX PARTITION ITERATOR | |1 |7 |
|4 | │ └─TABLE FULL SCAN |c |1 |7 |
|5 | └─NESTED-LOOP JOIN | |1 |7 |
|6 | ├─PX PARTITION ITERATOR | |1 |7 |
|7 | │ └─TABLE FULL SCAN |a |1 |7 |
|8 | └─MATERIAL | |1 |12 |
|9 | └─EXCHANGE IN DISTR | |1 |12 |
|10| └─EXCHANGE OUT DISTR (PKEY) |:EX10001|1 |11 |
|11| └─SUBPLAN SCAN |b |1 |10 |
|12| └─LIMIT | |1 |10 |
|13| └─EXCHANGE IN MERGE SORT DISTR| |1 |10 |
|14| └─EXCHANGE OUT DISTR |:EX10000|1 |9 |
|15| └─TOP-N SORT | |1 |7 |
|16| └─PX PARTITION ITERATOR | |1 |7 |
|17| └─HASH GROUP BY | |1 |7 |
|18| └─TABLE FULL SCAN |t4 |1 |7 |
==================================================================================
================================================================================
|ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)|
--------------------------------------------------------------------------------
|0 |PX COORDINATOR | |1 |44 |
|1 |└─EXCHANGE OUT DISTR |:EX10002|1 |42 |
|2 | └─HASH JOIN | |1 |38 |
|3 | ├─PX PARTITION ITERATOR | |1 |7 |
|4 | │ └─TABLE FULL SCAN |c |1 |7 |
|5 | └─NESTED-LOOP JOIN | |1 |31 |
|6 | ├─EXCHANGE IN DISTR | |1 |12 |
|7 | │ └─EXCHANGE OUT DISTR (PKEY) |:EX10001|1 |11 |
|8 | │ └─SUBPLAN SCAN |b |1 |10 |
|9 | │ └─LIMIT | |1 |10 |
|10| └─EXCHANGE IN MERGE SORT DISTR| |1 |10 |
|11| └─EXCHANGE OUT DISTR |:EX10000|1 |9 |
|12| │ └─TOP-N SORT | |1 |7 |
|13| └─PX PARTITION ITERATOR | |1 |7 |
|14| └─HASH GROUP BY | |1 |7 |
|15| └─TABLE FULL SCAN |t4 |1 |7 |
|16| └─PX PARTITION ITERATOR | |1 |54 |
|17| └─TABLE RANGE SCAN |a |1 |54 |
================================================================================
Outputs & filters:
-------------------------------------
0 - output([INTERNAL_FUNCTION(a.c1, a.c2, a.c3, a.c4, b.c1, b.c3, b.yyy, b.max(c4), c.c1, c.c2, c.c3, c.c4)]), filter(nil), rowset=16
1 - output([INTERNAL_FUNCTION(a.c1, a.c2, a.c3, a.c4, b.c1, b.c3, b.yyy, b.max(c4), c.c1, c.c2, c.c3, c.c4)]), filter(nil), rowset=16
dop=1
2 - output([c.c1], [a.c1], [b.c3], [c.c3], [c.c2], [c.c4], [b.c1], [a.c3], [a.c2], [a.c4], [b.yyy], [b.max(c4)]), filter(nil), rowset=16
2 - output([c.c1], [a.c1], [b.c3], [c.c3], [c.c2], [c.c4], [b.c1], [b.yyy], [b.max(c4)], [a.c2], [a.c3], [a.c4]), filter(nil), rowset=16
equal_conds([c.c1 = a.c1], [b.c3 = c.c3]), other_conds(nil)
3 - output([c.c1], [c.c2], [c.c3], [c.c4]), filter(nil), rowset=16
affinitize, partition wise, force partition granule
@ -1323,104 +1315,100 @@ Outputs & filters:
access([c.c1], [c.c2], [c.c3], [c.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
range_key([c.c1], [c.c2], [c.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
5 - output([a.c1], [b.c3], [b.c1], [a.c3], [a.c2], [a.c4], [b.yyy], [b.max(c4)]), filter(nil), rowset=16
conds([a.c1 = b.c1], [a.c3 = b.c3]), nl_params_(nil), use_batch=false
6 - output([a.c1], [a.c2], [a.c3], [a.c4]), filter(nil), rowset=16
affinitize, partition wise, force partition granule
7 - output([a.c1], [a.c2], [a.c3], [a.c4]), filter(nil), rowset=16
access([a.c1], [a.c2], [a.c3], [a.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
range_key([a.c1], [a.c2], [a.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
8 - output([b.c3], [b.c1], [b.yyy], [b.max(c4)]), filter(nil), rowset=16
9 - output([b.c3], [b.c1], [b.yyy], [b.max(c4)]), filter(nil), rowset=16
10 - output([b.c3], [b.c1], [b.yyy], [b.max(c4)]), filter(nil), rowset=16
5 - output([a.c1], [b.c3], [b.c1], [b.yyy], [b.max(c4)], [a.c2], [a.c3], [a.c4]), filter(nil), rowset=16
conds(nil), nl_params_([b.c1(:0)], [b.c3(:1)]), use_batch=false
6 - output([b.c3], [PARTITION_ID], [b.c1], [b.yyy], [b.max(c4)]), filter(nil), rowset=16
7 - output([b.c3], [PARTITION_ID], [b.c1], [b.yyy], [b.max(c4)]), filter(nil), rowset=16
(#keys=1, [b.c3]), is_single, dop=1
11 - output([b.c1], [b.c3], [b.yyy], [b.max(c4)]), filter(nil), rowset=16
8 - output([b.c1], [b.c3], [b.yyy], [b.max(c4)]), filter(nil), rowset=16
access([b.c1], [b.c3], [b.yyy], [b.max(c4)])
12 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
9 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
limit(1), offset(nil)
13 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
10 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
sort_keys([T_FUN_SUM(t4.c2), ASC])
14 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
11 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
dop=1
15 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
12 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
sort_keys([T_FUN_SUM(t4.c2), ASC]), topn(1)
16 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
13 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
partition wise, force partition granule
17 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
14 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
group([t4.c3]), agg_func([T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)])
18 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter(nil), rowset=16
15 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter(nil), rowset=16
access([t4.c1], [t4.c2], [t4.c3], [t4.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
range_key([t4.c1], [t4.c2], [t4.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
16 - output([a.c1], [a.c2], [a.c3], [a.c4]), filter(nil), rowset=16
affinitize, partition wise, force partition granule
17 - output([a.c1], [a.c2], [a.c3], [a.c4]), filter([a.c3 = :1]), rowset=16
access([a.c1], [a.c2], [a.c3], [a.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([a.c1], [a.c2], [a.c3]), range(MIN ; MAX),
range_cond([a.c1 = :0])
explain select /*+use_nl(a b) use_nl(b c)*/ * from t5 as a join t6 as b on a.c1 = b.c1 and a.c3 = b.c3 join (select c1, c3, sum(c2) as yyy, max(c4) from t4 group by c3 order by yyy limit 1) as c on b.c1=c.c1 and b.c3 = c.c3;
Query Plan
==================================================================================
|ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)|
----------------------------------------------------------------------------------
|0 |PX COORDINATOR | |1 |20 |
|1 |└─EXCHANGE OUT DISTR |:EX10002|1 |18 |
|2 | └─HASH JOIN | |1 |14 |
|3 | ├─PX PARTITION ITERATOR | |1 |7 |
|4 | │ └─TABLE FULL SCAN |a |1 |7 |
|5 | └─NESTED-LOOP JOIN | |1 |7 |
|6 | ├─PX PARTITION ITERATOR | |1 |7 |
|7 | │ └─TABLE FULL SCAN |b |1 |7 |
|8 | └─MATERIAL | |1 |12 |
|9 | └─EXCHANGE IN DISTR | |1 |12 |
|10| └─EXCHANGE OUT DISTR (PKEY) |:EX10001|1 |11 |
|11| └─SUBPLAN SCAN |c |1 |10 |
|12| └─LIMIT | |1 |10 |
|13| └─EXCHANGE IN MERGE SORT DISTR| |1 |10 |
|14| └─EXCHANGE OUT DISTR |:EX10000|1 |9 |
|15| └─TOP-N SORT | |1 |7 |
|16| └─PX PARTITION ITERATOR | |1 |7 |
|17| └─HASH GROUP BY | |1 |7 |
|18| └─TABLE FULL SCAN |t4 |1 |7 |
==================================================================================
==============================================================================
|ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)|
------------------------------------------------------------------------------
|0 |PX COORDINATOR | |1 |41 |
|1 |└─EXCHANGE OUT DISTR |:EX10002|1 |39 |
|2 | └─HASH JOIN | |1 |35 |
|3 | ├─EXCHANGE IN DISTR | |1 |12 |
|4 | │ └─EXCHANGE OUT DISTR (PKEY) |:EX10001|1 |11 |
|5 | │ └─SUBPLAN SCAN |c |1 |10 |
|6 | │ └─LIMIT | |1 |10 |
|7 | └─EXCHANGE IN MERGE SORT DISTR| |1 |10 |
|8 | └─EXCHANGE OUT DISTR |:EX10000|1 |9 |
|9 | └─TOP-N SORT | |1 |7 |
|10| └─PX PARTITION ITERATOR | |1 |7 |
|11| │ └─HASH GROUP BY | |1 |7 |
|12| │ └─TABLE FULL SCAN |t4 |1 |7 |
|13| └─PX PARTITION ITERATOR | |1 |23 |
|14| └─NESTED-LOOP JOIN | |1 |23 |
|15| ├─TABLE FULL SCAN |a |1 |7 |
|16| └─TABLE RANGE SCAN |b |1 |46 |
==============================================================================
Outputs & filters:
-------------------------------------
0 - output([INTERNAL_FUNCTION(a.c1, a.c2, a.c3, a.c4, b.c1, b.c2, b.c3, b.c4, c.c1, c.c3, c.yyy, c.max(c4))]), filter(nil), rowset=16
1 - output([INTERNAL_FUNCTION(a.c1, a.c2, a.c3, a.c4, b.c1, b.c2, b.c3, b.c4, c.c1, c.c3, c.yyy, c.max(c4))]), filter(nil), rowset=16
dop=1
2 - output([a.c1], [b.c1], [a.c3], [b.c3], [a.c2], [a.c4], [c.c1], [c.c3], [b.c2], [b.c4], [c.yyy], [c.max(c4)]), filter(nil), rowset=16
equal_conds([a.c1 = b.c1], [a.c3 = b.c3]), other_conds(nil)
3 - output([a.c1], [a.c2], [a.c3], [a.c4]), filter(nil), rowset=16
affinitize, partition wise, force partition granule
4 - output([a.c1], [a.c2], [a.c3], [a.c4]), filter(nil), rowset=16
access([a.c1], [a.c2], [a.c3], [a.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
range_key([a.c1], [a.c2], [a.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
5 - output([b.c1], [b.c3], [c.c1], [c.c3], [b.c2], [b.c4], [c.yyy], [c.max(c4)]), filter(nil), rowset=16
conds([b.c1 = c.c1], [b.c3 = c.c3]), nl_params_(nil), use_batch=false
6 - output([b.c1], [b.c2], [b.c3], [b.c4]), filter(nil), rowset=16
affinitize, partition wise, force partition granule
7 - output([b.c1], [b.c2], [b.c3], [b.c4]), filter(nil), rowset=16
access([b.c1], [b.c2], [b.c3], [b.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
range_key([b.c1], [b.c2], [b.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
8 - output([c.c1], [c.c3], [c.yyy], [c.max(c4)]), filter(nil), rowset=16
9 - output([c.c1], [c.c3], [c.yyy], [c.max(c4)]), filter(nil), rowset=16
10 - output([c.c1], [c.c3], [c.yyy], [c.max(c4)]), filter(nil), rowset=16
2 - output([c.c1], [a.c1], [b.c3], [c.c3], [c.yyy], [c.max(c4)], [a.c3], [a.c2], [a.c4], [b.c1], [b.c2], [b.c4]), filter(nil), rowset=16
equal_conds([c.c1 = a.c1], [b.c3 = c.c3]), other_conds(nil)
3 - output([c.c1], [c.c3], [c.yyy], [c.max(c4)]), filter(nil), rowset=16
4 - output([c.c1], [c.c3], [c.yyy], [c.max(c4)]), filter(nil), rowset=16
(#keys=1, [c.c3]), is_single, dop=1
11 - output([c.c1], [c.c3], [c.yyy], [c.max(c4)]), filter(nil), rowset=16
5 - output([c.c1], [c.c3], [c.yyy], [c.max(c4)]), filter(nil), rowset=16
access([c.c1], [c.c3], [c.yyy], [c.max(c4)])
12 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
6 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
limit(1), offset(nil)
13 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
7 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
sort_keys([T_FUN_SUM(t4.c2), ASC])
14 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
8 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
dop=1
15 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
9 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
sort_keys([T_FUN_SUM(t4.c2), ASC]), topn(1)
16 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
10 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
partition wise, force partition granule
17 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
11 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
group([t4.c3]), agg_func([T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)])
18 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter(nil), rowset=16
12 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter(nil), rowset=16
access([t4.c1], [t4.c2], [t4.c3], [t4.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
range_key([t4.c1], [t4.c2], [t4.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
13 - output([a.c1], [b.c3], [a.c3], [a.c2], [a.c4], [b.c1], [b.c2], [b.c4]), filter(nil), rowset=16
affinitize, partition wise, force partition granule
14 - output([a.c1], [b.c3], [a.c3], [a.c2], [a.c4], [b.c1], [b.c2], [b.c4]), filter(nil), rowset=16
conds(nil), nl_params_([a.c1(:0)], [a.c3(:1)]), use_batch=true
15 - output([a.c1], [a.c2], [a.c3], [a.c4]), filter(nil), rowset=16
access([a.c1], [a.c2], [a.c3], [a.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
range_key([a.c1], [a.c2], [a.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
16 - output([b.c1], [b.c2], [b.c3], [b.c4]), filter([:1 = b.c3]), rowset=16
access([GROUP_ID], [b.c1], [b.c2], [b.c3], [b.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([b.c1], [b.c2], [b.c3]), range(MIN ; MAX),
range_cond([:0 = b.c1])
explain select /*+use_nl(a b) use_nl(b c)*/ * from (select c1, c3, sum(c2) as yyy, max(c4) from t4 group by c3 order by yyy limit 2) as a left join t5 as b on a.c1 = b.c1 and a.c3 = b.c3 left join t6 as c on b.c1=c.c1 and b.c3 = c.c3;
Query Plan
==============================================================================
@ -1487,145 +1475,135 @@ Outputs & filters:
range_cond([:0 = c.c1])
explain select /*+use_nl(a b) use_nl(b c)*/ * from t5 as a left join (select c1, c3, sum(c2) as yyy, max(c4) from t4 group by c3 order by yyy limit 1) as b on a.c1 = b.c1 and a.c3 = b.c3 left join t6 as c on b.c1=c.c1 and b.c3 = c.c3;
Query Plan
======================================================================================
|ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)|
--------------------------------------------------------------------------------------
|0 |PX COORDINATOR | |1 |24 |
|1 |└─EXCHANGE OUT DISTR |:EX10003|1 |22 |
|2 | └─HASH RIGHT OUTER JOIN | |1 |18 |
|3 | ├─PX PARTITION ITERATOR | |1 |7 |
|4 | │ └─TABLE FULL SCAN |c |1 |7 |
|5 | └─EXCHANGE IN DISTR | |1 |11 |
|6 | └─EXCHANGE OUT DISTR (PKEY) |:EX10002|1 |10 |
|7 | └─NESTED-LOOP OUTER JOIN | |1 |7 |
|8 | ├─PX PARTITION ITERATOR | |1 |7 |
|9 | │ └─TABLE FULL SCAN |a |1 |7 |
|10| └─MATERIAL | |1 |12 |
|11| └─EXCHANGE IN DISTR | |1 |12 |
|12| └─EXCHANGE OUT DISTR (PKEY) |:EX10001|1 |11 |
|13| └─SUBPLAN SCAN |b |1 |10 |
|14| └─LIMIT | |1 |10 |
|15| └─EXCHANGE IN MERGE SORT DISTR| |1 |10 |
|16| └─EXCHANGE OUT DISTR |:EX10000|1 |9 |
|17| └─TOP-N SORT | |1 |7 |
|18| └─PX PARTITION ITERATOR | |1 |7 |
|19| └─HASH GROUP BY | |1 |7 |
|20| └─TABLE FULL SCAN |t4 |1 |7 |
======================================================================================
====================================================================================
|ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)|
------------------------------------------------------------------------------------
|0 |PX COORDINATOR | |1 |48 |
|1 |└─EXCHANGE OUT DISTR |:EX10003|1 |46 |
|2 | └─HASH OUTER JOIN | |1 |42 |
|3 | ├─PX PARTITION ITERATOR | |1 |7 |
|4 | │ └─TABLE FULL SCAN |a |1 |7 |
|5 | └─EXCHANGE IN DISTR | |1 |35 |
|6 | └─EXCHANGE OUT DISTR (PKEY) |:EX10002|1 |34 |
|7 | └─NESTED-LOOP OUTER JOIN | |1 |31 |
|8 | ├─EXCHANGE IN DISTR | |1 |12 |
|9 | │ └─EXCHANGE OUT DISTR (PKEY) |:EX10001|1 |11 |
|10| │ └─SUBPLAN SCAN |b |1 |10 |
|11| │ └─LIMIT | |1 |10 |
|12| └─EXCHANGE IN MERGE SORT DISTR| |1 |10 |
|13| └─EXCHANGE OUT DISTR |:EX10000|1 |9 |
|14| │ └─TOP-N SORT | |1 |7 |
|15| └─PX PARTITION ITERATOR | |1 |7 |
|16| └─HASH GROUP BY | |1 |7 |
|17| └─TABLE FULL SCAN |t4 |1 |7 |
|18| └─PX PARTITION ITERATOR | |1 |54 |
|19| └─TABLE RANGE SCAN |c |1 |54 |
====================================================================================
Outputs & filters:
-------------------------------------
0 - output([INTERNAL_FUNCTION(a.c1, a.c2, a.c3, a.c4, b.c1, b.c3, b.yyy, b.max(c4), c.c1, c.c2, c.c3, c.c4)]), filter(nil), rowset=16
1 - output([INTERNAL_FUNCTION(a.c1, a.c2, a.c3, a.c4, b.c1, b.c3, b.yyy, b.max(c4), c.c1, c.c2, c.c3, c.c4)]), filter(nil), rowset=16
dop=1
2 - output([b.c1], [c.c1], [b.c3], [c.c3], [c.c2], [c.c4], [a.c1], [a.c3], [a.c2], [a.c4], [b.yyy], [b.max(c4)]), filter(nil), rowset=16
equal_conds([b.c1 = c.c1], [b.c3 = c.c3]), other_conds(nil)
3 - output([c.c1], [c.c2], [c.c3], [c.c4]), filter(nil), rowset=16
affinitize, force partition granule
4 - output([c.c1], [c.c2], [c.c3], [c.c4]), filter(nil), rowset=16
access([c.c1], [c.c2], [c.c3], [c.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
range_key([c.c1], [c.c2], [c.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
5 - output([b.c1], [b.c3], [a.c1], [a.c3], [a.c2], [a.c4], [b.yyy], [b.max(c4)]), filter(nil), rowset=16
6 - output([b.c1], [b.c3], [a.c1], [a.c3], [a.c2], [a.c4], [b.yyy], [b.max(c4)]), filter(nil), rowset=16
(#keys=1, [b.c3]), dop=1
7 - output([b.c1], [b.c3], [a.c1], [a.c3], [a.c2], [a.c4], [b.yyy], [b.max(c4)]), filter(nil), rowset=16
conds([a.c1 = b.c1], [a.c3 = b.c3]), nl_params_(nil), use_batch=false
8 - output([a.c1], [a.c2], [a.c3], [a.c4]), filter(nil), rowset=16
affinitize, force partition granule
9 - output([a.c1], [a.c2], [a.c3], [a.c4]), filter(nil), rowset=16
access([a.c1], [a.c2], [a.c3], [a.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
range_key([a.c1], [a.c2], [a.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
10 - output([b.c1], [b.c3], [b.yyy], [b.max(c4)]), filter(nil), rowset=16
11 - output([b.c1], [b.c3], [b.yyy], [b.max(c4)]), filter(nil), rowset=16
12 - output([b.c1], [b.c3], [b.yyy], [b.max(c4)]), filter(nil), rowset=16
(#keys=1, [b.c3]), is_single, dop=1
13 - output([b.c1], [b.c3], [b.yyy], [b.max(c4)]), filter(nil), rowset=16
access([b.c1], [b.c3], [b.yyy], [b.max(c4)])
14 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
limit(1), offset(nil)
15 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
sort_keys([T_FUN_SUM(t4.c2), ASC])
16 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
dop=1
17 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
sort_keys([T_FUN_SUM(t4.c2), ASC]), topn(1)
18 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
partition wise, force partition granule
19 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
group([t4.c3]), agg_func([T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)])
20 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter(nil), rowset=16
access([t4.c1], [t4.c2], [t4.c3], [t4.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
range_key([t4.c1], [t4.c2], [t4.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
explain select /*+use_nl(a b) use_nl(b c)*/ * from t5 as a left join t6 as b on a.c1 = b.c1 and a.c3 = b.c3 left join (select c1, c3, sum(c2) as yyy, max(c4) from t4 group by c3 order by yyy limit 1) as c on b.c1=c.c1 and b.c3 = c.c3;
Query Plan
==================================================================================
|ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)|
----------------------------------------------------------------------------------
|0 |PX COORDINATOR | |1 |20 |
|1 |└─EXCHANGE OUT DISTR |:EX10002|1 |18 |
|2 | └─HASH OUTER JOIN | |1 |14 |
|3 | ├─PX PARTITION ITERATOR | |1 |7 |
|4 | │ └─TABLE FULL SCAN |a |1 |7 |
|5 | └─NESTED-LOOP OUTER JOIN | |1 |7 |
|6 | ├─PX PARTITION ITERATOR | |1 |7 |
|7 | │ └─TABLE FULL SCAN |b |1 |7 |
|8 | └─MATERIAL | |1 |12 |
|9 | └─EXCHANGE IN DISTR | |1 |12 |
|10| └─EXCHANGE OUT DISTR (PKEY) |:EX10001|1 |11 |
|11| └─SUBPLAN SCAN |c |1 |10 |
|12| └─LIMIT | |1 |10 |
|13| └─EXCHANGE IN MERGE SORT DISTR| |1 |10 |
|14| └─EXCHANGE OUT DISTR |:EX10000|1 |9 |
|15| └─TOP-N SORT | |1 |7 |
|16| └─PX PARTITION ITERATOR | |1 |7 |
|17| └─HASH GROUP BY | |1 |7 |
|18| └─TABLE FULL SCAN |t4 |1 |7 |
==================================================================================
Outputs & filters:
-------------------------------------
0 - output([INTERNAL_FUNCTION(a.c1, a.c2, a.c3, a.c4, b.c1, b.c2, b.c3, b.c4, c.c1, c.c3, c.yyy, c.max(c4))]), filter(nil), rowset=16
1 - output([INTERNAL_FUNCTION(a.c1, a.c2, a.c3, a.c4, b.c1, b.c2, b.c3, b.c4, c.c1, c.c3, c.yyy, c.max(c4))]), filter(nil), rowset=16
dop=1
2 - output([a.c1], [b.c1], [a.c3], [b.c3], [a.c2], [a.c4], [c.c1], [c.c3], [b.c2], [b.c4], [c.yyy], [c.max(c4)]), filter(nil), rowset=16
2 - output([a.c1], [b.c1], [a.c3], [b.c3], [a.c2], [a.c4], [b.yyy], [b.max(c4)], [c.c1], [c.c2], [c.c3], [c.c4]), filter(nil), rowset=16
equal_conds([a.c1 = b.c1], [a.c3 = b.c3]), other_conds(nil)
3 - output([a.c1], [a.c2], [a.c3], [a.c4]), filter(nil), rowset=16
affinitize, partition wise, force partition granule
affinitize, force partition granule
4 - output([a.c1], [a.c2], [a.c3], [a.c4]), filter(nil), rowset=16
access([a.c1], [a.c2], [a.c3], [a.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
range_key([a.c1], [a.c2], [a.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
5 - output([b.c1], [b.c3], [c.c1], [c.c3], [b.c2], [b.c4], [c.yyy], [c.max(c4)]), filter(nil), rowset=16
conds([b.c1 = c.c1], [b.c3 = c.c3]), nl_params_(nil), use_batch=false
6 - output([b.c1], [b.c2], [b.c3], [b.c4]), filter(nil), rowset=16
affinitize, partition wise, force partition granule
7 - output([b.c1], [b.c2], [b.c3], [b.c4]), filter(nil), rowset=16
access([b.c1], [b.c2], [b.c3], [b.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
range_key([b.c1], [b.c2], [b.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
8 - output([c.c1], [c.c3], [c.yyy], [c.max(c4)]), filter(nil), rowset=16
9 - output([c.c1], [c.c3], [c.yyy], [c.max(c4)]), filter(nil), rowset=16
10 - output([c.c1], [c.c3], [c.yyy], [c.max(c4)]), filter(nil), rowset=16
(#keys=1, [c.c3]), is_single, dop=1
11 - output([c.c1], [c.c3], [c.yyy], [c.max(c4)]), filter(nil), rowset=16
access([c.c1], [c.c3], [c.yyy], [c.max(c4)])
12 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
5 - output([b.c1], [b.c3], [b.yyy], [b.max(c4)], [c.c1], [c.c2], [c.c3], [c.c4]), filter(nil), rowset=16
6 - output([b.c1], [b.c3], [b.yyy], [b.max(c4)], [c.c1], [c.c2], [c.c3], [c.c4]), filter(nil), rowset=16
(#keys=1, [b.c3]), dop=1
7 - output([b.c1], [b.c3], [b.yyy], [b.max(c4)], [c.c1], [c.c2], [c.c3], [c.c4]), filter(nil), rowset=16
conds(nil), nl_params_([b.c1(:0)], [b.c3(:1)]), use_batch=false
8 - output([b.c1], [b.c3], [PARTITION_ID], [b.yyy], [b.max(c4)]), filter(nil), rowset=16
9 - output([b.c1], [b.c3], [PARTITION_ID], [b.yyy], [b.max(c4)]), filter(nil), rowset=16
(#keys=1, [b.c3]), is_single, dop=1
10 - output([b.c1], [b.c3], [b.yyy], [b.max(c4)]), filter(nil), rowset=16
access([b.c1], [b.c3], [b.yyy], [b.max(c4)])
11 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
limit(1), offset(nil)
13 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
12 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
sort_keys([T_FUN_SUM(t4.c2), ASC])
14 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
13 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
dop=1
15 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
14 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
sort_keys([T_FUN_SUM(t4.c2), ASC]), topn(1)
16 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
15 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
partition wise, force partition granule
17 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
16 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
group([t4.c3]), agg_func([T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)])
18 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter(nil), rowset=16
17 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter(nil), rowset=16
access([t4.c1], [t4.c2], [t4.c3], [t4.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
range_key([t4.c1], [t4.c2], [t4.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
18 - output([c.c1], [c.c2], [c.c3], [c.c4]), filter(nil), rowset=16
affinitize, force partition granule
19 - output([c.c1], [c.c2], [c.c3], [c.c4]), filter([:1 = c.c3]), rowset=16
access([c.c1], [c.c2], [c.c3], [c.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([c.c1], [c.c2], [c.c3]), range(MIN ; MAX),
range_cond([:0 = c.c1])
explain select /*+use_nl(a b) use_nl(b c)*/ * from t5 as a left join t6 as b on a.c1 = b.c1 and a.c3 = b.c3 left join (select c1, c3, sum(c2) as yyy, max(c4) from t4 group by c3 order by yyy limit 1) as c on b.c1=c.c1 and b.c3 = c.c3;
Query Plan
=====================================================================
|ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)|
---------------------------------------------------------------------
|0 |HASH RIGHT OUTER JOIN | |1 |37 |
|1 |├─SUBPLAN SCAN |c |1 |10 |
|2 |│ └─LIMIT | |1 |10 |
|3 |│ └─PX COORDINATOR MERGE SORT | |1 |10 |
|4 |│ └─EXCHANGE OUT DISTR |:EX10000|1 |9 |
|5 |│ └─TOP-N SORT | |1 |7 |
|6 |│ └─PX PARTITION ITERATOR| |1 |7 |
|7 |│ └─HASH GROUP BY | |1 |7 |
|8 |│ └─TABLE FULL SCAN |t4 |1 |7 |
|9 |└─PX COORDINATOR | |1 |27 |
|10| └─EXCHANGE OUT DISTR |:EX20000|1 |26 |
|11| └─PX PARTITION ITERATOR | |1 |23 |
|12| └─NESTED-LOOP OUTER JOIN | |1 |23 |
|13| ├─TABLE FULL SCAN |a |1 |7 |
|14| └─TABLE RANGE SCAN |b |1 |46 |
=====================================================================
Outputs & filters:
-------------------------------------
0 - output([a.c1], [a.c2], [a.c3], [a.c4], [b.c1], [b.c2], [b.c3], [b.c4], [c.c1], [c.c3], [c.yyy], [c.max(c4)]), filter(nil), rowset=16
equal_conds([b.c1 = c.c1], [b.c3 = c.c3]), other_conds(nil)
1 - output([c.c1], [c.c3], [c.yyy], [c.max(c4)]), filter(nil), rowset=16
access([c.c1], [c.c3], [c.yyy], [c.max(c4)])
2 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
limit(1), offset(nil)
3 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
sort_keys([T_FUN_SUM(t4.c2), ASC])
4 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
dop=1
5 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
sort_keys([T_FUN_SUM(t4.c2), ASC]), topn(1)
6 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
partition wise, force partition granule
7 - output([t4.c1], [t4.c3], [T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]), filter(nil), rowset=16
group([t4.c3]), agg_func([T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)])
8 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter(nil), rowset=16
access([t4.c1], [t4.c2], [t4.c3], [t4.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
range_key([t4.c1], [t4.c2], [t4.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
9 - output([a.c1], [a.c2], [a.c3], [a.c4], [b.c1], [b.c2], [b.c3], [b.c4]), filter(nil), rowset=16
10 - output([a.c1], [a.c2], [a.c3], [a.c4], [b.c1], [b.c2], [b.c3], [b.c4]), filter(nil), rowset=16
dop=1
11 - output([a.c1], [a.c2], [a.c3], [a.c4], [b.c1], [b.c2], [b.c3], [b.c4]), filter(nil), rowset=16
partition wise, force partition granule
12 - output([a.c1], [a.c2], [a.c3], [a.c4], [b.c1], [b.c2], [b.c3], [b.c4]), filter(nil), rowset=16
conds(nil), nl_params_([a.c1(:0)], [a.c3(:1)]), use_batch=true
13 - output([a.c1], [a.c2], [a.c3], [a.c4]), filter(nil), rowset=16
access([a.c1], [a.c2], [a.c3], [a.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
range_key([a.c1], [a.c2], [a.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
14 - output([b.c1], [b.c2], [b.c3], [b.c4]), filter([:1 = b.c3]), rowset=16
access([GROUP_ID], [b.c1], [b.c2], [b.c3], [b.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([b.c1], [b.c2], [b.c3]), range(MIN ; MAX),
range_cond([:0 = b.c1])
explain select /*+use_nl(c)*/ * from t5 as a left join t6 as b on a.c1 = b.c1 and a.c3 = b.c3 left join t4 as c on b.c1=c.c1 and b.c3 = c.c3;
Query Plan
================================================================

View File

@ -321,27 +321,26 @@ select /*+use_nl(t1, t2)*/ * from t1 where exists (select 1 from t2 where t1.c1
EXPLAIN select /*+use_nl(t1, t2)*/ * from t1 where exists (select 1 from t2 where t1.c1 = t2.c1);
Query Plan
===================================================
|ID|OPERATOR |NAME|EST.ROWS|EST.TIME(us)|
---------------------------------------------------
|0 |NESTED-LOOP JOIN | |4 |3 |
|1 |├─TABLE FULL SCAN |t2 |4 |3 |
|2 |└─MATERIAL | |5 |3 |
|3 | └─TABLE FULL SCAN|t1 |5 |3 |
===================================================
=======================================================
|ID|OPERATOR |NAME|EST.ROWS|EST.TIME(us)|
-------------------------------------------------------
|0 |NESTED-LOOP JOIN | |4 |96 |
|1 |├─TABLE FULL SCAN |t1 |5 |3 |
|2 |└─DISTRIBUTED TABLE GET|t2 |1 |18 |
=======================================================
Outputs & filters:
-------------------------------------
0 - output([t1.c1], [t1.c2]), filter(nil), rowset=16
conds([t1.c1 = t2.c1]), nl_params_(nil), use_batch=false
1 - output([t2.c1]), filter(nil), rowset=16
access([t2.c1]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([t2.c1]), range(MIN ; MAX)always true
2 - output([t1.c1], [t1.c2]), filter(nil), rowset=16
3 - output([t1.c2], [t1.c1]), filter(nil), rowset=16
conds(nil), nl_params_([t1.c1(:0)]), use_batch=false
1 - output([t1.c2], [t1.c1]), filter(nil), rowset=16
access([t1.c2], [t1.c1]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([t1.c2]), range(MIN ; MAX)always true
2 - output(nil), filter(nil), rowset=16
access(nil), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([t2.c1]), range(MIN ; MAX),
range_cond([:0 = t2.c1])
select /*+use_nl(t1, t2)*/ * from t1 where exists (select 1 from t2 where t1.c1 = t2.c1);
+------+----+
| c1 | c2 |
@ -720,27 +719,26 @@ select /*+use_nl(t1, t2)*/ * from t1 where exists (select 1 from t2 where t1.c1
EXPLAIN select /*+use_nl(t1, t2)*/ * from t1 where exists (select 1 from t2 where t1.c1 = t2.c1);
Query Plan
===================================================
|ID|OPERATOR |NAME|EST.ROWS|EST.TIME(us)|
---------------------------------------------------
|0 |NESTED-LOOP JOIN | |4 |3 |
|1 |├─TABLE FULL SCAN |t2 |4 |3 |
|2 |└─MATERIAL | |5 |3 |
|3 | └─TABLE FULL SCAN|t1 |5 |3 |
===================================================
=======================================================
|ID|OPERATOR |NAME|EST.ROWS|EST.TIME(us)|
-------------------------------------------------------
|0 |NESTED-LOOP JOIN | |4 |83 |
|1 |├─TABLE FULL SCAN |t1 |5 |3 |
|2 |└─DISTRIBUTED TABLE GET|t2 |1 |16 |
=======================================================
Outputs & filters:
-------------------------------------
0 - output([t1.c1], [t1.c2]), filter(nil), rowset=16
conds([t1.c1 = t2.c1]), nl_params_(nil), use_batch=false
1 - output([t2.c1]), filter(nil), rowset=16
access([t2.c1]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([t2.c1]), range(MIN ; MAX)always true
2 - output([t1.c1], [t1.c2]), filter(nil), rowset=16
3 - output([t1.c2], [t1.c1]), filter(nil), rowset=16
conds(nil), nl_params_([t1.c1(:0)]), use_batch=true
1 - output([t1.c2], [t1.c1]), filter(nil), rowset=16
access([t1.c2], [t1.c1]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([t1.c2]), range(MIN ; MAX)always true
2 - output(nil), filter(nil), rowset=16
access([GROUP_ID]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([t2.c1]), range(MIN ; MAX),
range_cond([:0 = t2.c1])
select /*+use_nl(t1, t2)*/ * from t1 where exists (select 1 from t2 where t1.c1 = t2.c1);
+------+----+
| c1 | c2 |

View File

@ -345,38 +345,34 @@ Query Plan
==============================================================
|ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)|
--------------------------------------------------------------
|0 |NESTED-LOOP JOIN | |3 |3 |
|1 |├─NESTED-LOOP JOIN CARTESIAN | |3 |3 |
|2 |│ ├─TABLE FULL SCAN |t2 |3 |3 |
|3 |│ └─MATERIAL | |1 |3 |
|4 | └─SUBPLAN SCAN |VIEW1|1 |3 |
|5 | └─SCALAR GROUP BY | |1 |3 |
|6 | └─TABLE FULL SCAN |t3 |1 |3 |
|7 |└─MATERIAL | |3 |3 |
|8 | └─TABLE FULL SCAN |t1 |3 |3 |
|0 |HASH JOIN | |3 |9 |
|1 |├─TABLE FULL SCAN |t2 |3 |3 |
|2 |└─NESTED-LOOP JOIN CARTESIAN | |3 |6 |
|3 | ├─SUBPLAN SCAN |VIEW1|1 |3 |
|4 | └─SCALAR GROUP BY | |1 |3 |
|5 | └─TABLE FULL SCAN |t3 |1 |3 |
|6 | └─TABLE FULL SCAN |t1 |3 |3 |
==============================================================
Outputs & filters:
-------------------------------------
0 - output([t1.a], [t1.b], [t1.c], [t2.a], [t2.b], [t2.c]), filter(nil), rowset=16
conds([cast(t1.a, DECIMAL_INT(34, 0)) + VIEW1.sum(b) = cast(t2.b, DECIMAL_INT(34, 0))]), nl_params_(nil), use_batch=false
1 - output([t2.a], [t2.b], [t2.c], [VIEW1.sum(b)]), filter(nil), rowset=16
conds(nil), nl_params_(nil), use_batch=false
2 - output([t2.a], [t2.b], [t2.c]), filter(nil), rowset=16
equal_conds([cast(t1.a, DECIMAL_INT(34, 0)) + VIEW1.sum(b) = cast(t2.b, DECIMAL_INT(34, 0))]), other_conds(nil)
1 - output([t2.a], [t2.b], [t2.c]), filter(nil), rowset=16
access([t2.a], [t2.b], [t2.c]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([t2.a]), range(MIN ; MAX)always true
2 - output([t1.a], [t1.b], [t1.c], [VIEW1.sum(b)]), filter(nil), rowset=16
conds(nil), nl_params_(nil), use_batch=false
3 - output([VIEW1.sum(b)]), filter(nil), rowset=16
4 - output([VIEW1.sum(b)]), filter(nil), rowset=16
access([VIEW1.sum(b)])
5 - output([T_FUN_SUM(T_FUN_SUM(t3.b))]), filter(nil), rowset=16
4 - output([T_FUN_SUM(T_FUN_SUM(t3.b))]), filter(nil), rowset=16
group(nil), agg_func([T_FUN_SUM(T_FUN_SUM(t3.b))])
6 - output([T_FUN_SUM(t3.b)]), filter(nil), rowset=16
5 - output([T_FUN_SUM(t3.b)]), filter(nil), rowset=16
access([t3.b]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([t3.a]), range(MIN ; MAX)always true,
pushdown_aggregation([T_FUN_SUM(t3.b)])
7 - output([t1.a], [t1.b], [t1.c]), filter(nil), rowset=16
8 - output([t1.a], [t1.b], [t1.c]), filter(nil), rowset=16
6 - output([t1.a], [t1.b], [t1.c]), filter(nil), rowset=16
access([t1.a], [t1.b], [t1.c]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([t1.a]), range(MIN ; MAX)always true
@ -429,13 +425,12 @@ Query Plan
==============================================================
|ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)|
--------------------------------------------------------------
|0 |HASH GROUP BY | |1 |3 |
|1 |└─NESTED-LOOP JOIN CARTESIAN | |3 |3 |
|2 | ├─TABLE FULL SCAN |t1 |3 |3 |
|3 | └─MATERIAL | |1 |3 |
|4 | └─SUBPLAN SCAN |VIEW1|1 |3 |
|5 | └─SCALAR GROUP BY | |1 |3 |
|6 | └─TABLE FULL SCAN |t2 |3 |3 |
|0 |HASH GROUP BY | |1 |6 |
|1 |└─NESTED-LOOP JOIN CARTESIAN | |3 |6 |
|2 | ├─SUBPLAN SCAN |VIEW1|1 |3 |
|3 | │ └─SCALAR GROUP BY | |1 |3 |
|4 | └─TABLE FULL SCAN |t2 |3 |3 |
|5 | └─TABLE FULL SCAN |t1 |3 |3 |
==============================================================
Outputs & filters:
-------------------------------------
@ -443,20 +438,19 @@ Outputs & filters:
group([VIEW1.sum(b)]), agg_func([T_FUN_SUM(t1.a)])
1 - output([VIEW1.sum(b)], [t1.a]), filter(nil), rowset=16
conds(nil), nl_params_(nil), use_batch=false
2 - output([t1.a]), filter(nil), rowset=16
access([t1.a]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([t1.a]), range(MIN ; MAX)always true
3 - output([VIEW1.sum(b)]), filter(nil), rowset=16
4 - output([VIEW1.sum(b)]), filter(nil), rowset=16
2 - output([VIEW1.sum(b)]), filter(nil), rowset=16
access([VIEW1.sum(b)])
5 - output([T_FUN_SUM(T_FUN_SUM(t2.b))]), filter(nil), rowset=16
3 - output([T_FUN_SUM(T_FUN_SUM(t2.b))]), filter(nil), rowset=16
group(nil), agg_func([T_FUN_SUM(T_FUN_SUM(t2.b))])
6 - output([T_FUN_SUM(t2.b)]), filter(nil), rowset=16
4 - output([T_FUN_SUM(t2.b)]), filter(nil), rowset=16
access([t2.b]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([t2.a]), range(MIN ; MAX)always true,
pushdown_aggregation([T_FUN_SUM(t2.b)])
5 - output([t1.a]), filter(nil), rowset=16
access([t1.a]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([t1.a]), range(MIN ; MAX)always true
select (select sum(b) from t2) as temp, sum(a) from t1 group by temp;
+------+--------+
| temp | sum(a) |
@ -468,13 +462,12 @@ Query Plan
==============================================================
|ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)|
--------------------------------------------------------------
|0 |HASH DISTINCT | |1 |3 |
|1 |└─NESTED-LOOP JOIN CARTESIAN | |1 |3 |
|2 | ├─TABLE FULL SCAN |t1 |3 |3 |
|3 | └─MATERIAL | |1 |3 |
|4 | └─SUBPLAN SCAN |VIEW1|1 |3 |
|5 | └─SCALAR GROUP BY | |1 |3 |
|6 | └─TABLE FULL SCAN |t2 |3 |3 |
|0 |HASH DISTINCT | |1 |6 |
|1 |└─NESTED-LOOP JOIN CARTESIAN | |1 |6 |
|2 | ├─SUBPLAN SCAN |VIEW1|1 |3 |
|3 | │ └─SCALAR GROUP BY | |1 |3 |
|4 | └─TABLE FULL SCAN |t2 |3 |3 |
|5 | └─TABLE FULL SCAN |t1 |3 |3 |
==============================================================
Outputs & filters:
-------------------------------------
@ -482,20 +475,19 @@ Outputs & filters:
distinct([VIEW1.sum(b)])
1 - output([VIEW1.sum(b)]), filter(nil), rowset=16
conds(nil), nl_params_(nil), use_batch=false
2 - output(nil), filter(nil), rowset=16
access(nil), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([t1.a]), range(MIN ; MAX)always true
3 - output([VIEW1.sum(b)]), filter(nil), rowset=16
4 - output([VIEW1.sum(b)]), filter(nil), rowset=16
2 - output([VIEW1.sum(b)]), filter(nil), rowset=16
access([VIEW1.sum(b)])
5 - output([T_FUN_SUM(T_FUN_SUM(t2.b))]), filter([T_FUN_SUM(T_FUN_SUM(t2.b)) > cast(4, DECIMAL_INT(33, 0))]), rowset=16
3 - output([T_FUN_SUM(T_FUN_SUM(t2.b))]), filter([T_FUN_SUM(T_FUN_SUM(t2.b)) > cast(4, DECIMAL_INT(33, 0))]), rowset=16
group(nil), agg_func([T_FUN_SUM(T_FUN_SUM(t2.b))])
6 - output([T_FUN_SUM(t2.b)]), filter(nil), rowset=16
4 - output([T_FUN_SUM(t2.b)]), filter(nil), rowset=16
access([t2.b]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([t2.a]), range(MIN ; MAX)always true,
pushdown_aggregation([T_FUN_SUM(t2.b)])
5 - output(nil), filter(nil), rowset=16
access(nil), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([t1.a]), range(MIN ; MAX)always true
select (select sum(b) from t2) as temp from t1 group by temp having temp > 4;
+------+
| temp |
@ -507,13 +499,12 @@ Query Plan
==============================================================
|ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)|
--------------------------------------------------------------
|0 |HASH DISTINCT | |1 |3 |
|1 |└─NESTED-LOOP JOIN CARTESIAN | |1 |3 |
|2 | ├─TABLE FULL SCAN |t1 |3 |3 |
|3 | └─MATERIAL | |1 |3 |
|4 | └─SUBPLAN SCAN |VIEW1|1 |3 |
|5 | └─SCALAR GROUP BY | |1 |3 |
|6 | └─TABLE FULL SCAN |t2 |3 |3 |
|0 |HASH DISTINCT | |1 |6 |
|1 |└─NESTED-LOOP JOIN CARTESIAN | |1 |6 |
|2 | ├─SUBPLAN SCAN |VIEW1|1 |3 |
|3 | │ └─SCALAR GROUP BY | |1 |3 |
|4 | └─TABLE FULL SCAN |t2 |3 |3 |
|5 | └─TABLE FULL SCAN |t1 |3 |3 |
==============================================================
Outputs & filters:
-------------------------------------
@ -521,20 +512,19 @@ Outputs & filters:
distinct([VIEW1.sum(b)])
1 - output([VIEW1.sum(b)]), filter(nil), rowset=16
conds(nil), nl_params_(nil), use_batch=false
2 - output(nil), filter(nil), rowset=16
access(nil), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([t1.a]), range(MIN ; MAX)always true
3 - output([VIEW1.sum(b)]), filter(nil), rowset=16
4 - output([VIEW1.sum(b)]), filter(nil), rowset=16
2 - output([VIEW1.sum(b)]), filter(nil), rowset=16
access([VIEW1.sum(b)])
5 - output([T_FUN_SUM(T_FUN_SUM(t2.b))]), filter([T_FUN_SUM(T_FUN_SUM(t2.b)) < cast(4, DECIMAL_INT(33, 0))]), rowset=16
3 - output([T_FUN_SUM(T_FUN_SUM(t2.b))]), filter([T_FUN_SUM(T_FUN_SUM(t2.b)) < cast(4, DECIMAL_INT(33, 0))]), rowset=16
group(nil), agg_func([T_FUN_SUM(T_FUN_SUM(t2.b))])
6 - output([T_FUN_SUM(t2.b)]), filter(nil), rowset=16
4 - output([T_FUN_SUM(t2.b)]), filter(nil), rowset=16
access([t2.b]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([t2.a]), range(MIN ; MAX)always true,
pushdown_aggregation([T_FUN_SUM(t2.b)])
5 - output(nil), filter(nil), rowset=16
access(nil), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([t1.a]), range(MIN ; MAX)always true
select (select sum(b) from t2) as temp from t1 group by temp having temp < 4;
+------+
| temp |
@ -545,54 +535,50 @@ Query Plan
==================================================================
|ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)|
------------------------------------------------------------------
|0 |NESTED-LOOP JOIN | |1 |3 |
|1 |├─SUBPLAN SCAN |VIEW2|1 |3 |
|2 |│ └─HASH DISTINCT | |1 |3 |
|3 |│ └─NESTED-LOOP JOIN CARTESIAN | |1 |3 |
|4 |│ ├─TABLE FULL SCAN |t1 |3 |3 |
|5 |│ └─MATERIAL | |1 |3 |
|6 | └─SUBPLAN SCAN |VIEW1|1 |3 |
|7 | ─SCALAR GROUP BY | |1 |3 |
|8 | └─TABLE FULL SCAN |t2 |3 |3 |
|9 |└─MATERIAL | |1 |3 |
|10| └─SUBPLAN SCAN |VIEW3|1 |3 |
|11| └─SCALAR GROUP BY | |1 |3 |
|12| └─TABLE FULL SCAN |t3 |1 |3 |
|0 |NESTED-LOOP JOIN | |1 |9 |
|1 |├─SUBPLAN SCAN |VIEW3|1 |3 |
|2 |│ └─SCALAR GROUP BY | |1 |3 |
|3 |│ └─TABLE FULL SCAN |t3 |1 |3 |
|4 |└─SUBPLAN SCAN |VIEW2|1 |6 |
|5 | └─HASH DISTINCT | |1 |6 |
|6 | └─NESTED-LOOP JOIN CARTESIAN | |1 |6 |
|7 | ─SUBPLAN SCAN |VIEW1|1 |3 |
|8 | └─SCALAR GROUP BY | |1 |3 |
|9 | └─TABLE FULL SCAN |t2 |3 |3 |
|10| └─TABLE FULL SCAN |t1 |3 |3 |
==================================================================
Outputs & filters:
-------------------------------------
0 - output([VIEW2.VIEW1.sum(b)]), filter(nil), rowset=16
conds([VIEW2.VIEW1.sum(b) > VIEW3.sum(b)]), nl_params_(nil), use_batch=false
1 - output([VIEW2.VIEW1.sum(b)]), filter(nil), rowset=16
access([VIEW2.VIEW1.sum(b)])
2 - output([VIEW1.sum(b)]), filter(nil), rowset=16
distinct([VIEW1.sum(b)])
3 - output([VIEW1.sum(b)]), filter(nil), rowset=16
conds(nil), nl_params_(nil), use_batch=false
4 - output(nil), filter(nil), rowset=16
access(nil), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([t1.a]), range(MIN ; MAX)always true
5 - output([VIEW1.sum(b)]), filter(nil), rowset=16
6 - output([VIEW1.sum(b)]), filter(nil), rowset=16
access([VIEW1.sum(b)])
7 - output([T_FUN_SUM(T_FUN_SUM(t2.b))]), filter([T_FUN_SUM(T_FUN_SUM(t2.b)) > cast(4, DECIMAL_INT(33, 0))]), rowset=16
group(nil), agg_func([T_FUN_SUM(T_FUN_SUM(t2.b))])
8 - output([T_FUN_SUM(t2.b)]), filter(nil), rowset=16
access([t2.b]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([t2.a]), range(MIN ; MAX)always true,
pushdown_aggregation([T_FUN_SUM(t2.b)])
9 - output([VIEW3.sum(b)]), filter(nil), rowset=16
10 - output([VIEW3.sum(b)]), filter(nil), rowset=16
1 - output([VIEW3.sum(b)]), filter(nil), rowset=16
access([VIEW3.sum(b)])
11 - output([T_FUN_SUM(T_FUN_SUM(t3.b))]), filter(nil), rowset=16
2 - output([T_FUN_SUM(T_FUN_SUM(t3.b))]), filter(nil), rowset=16
group(nil), agg_func([T_FUN_SUM(T_FUN_SUM(t3.b))])
12 - output([T_FUN_SUM(t3.b)]), filter(nil), rowset=16
3 - output([T_FUN_SUM(t3.b)]), filter(nil), rowset=16
access([t3.b]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([t3.a]), range(MIN ; MAX)always true,
pushdown_aggregation([T_FUN_SUM(t3.b)])
4 - output([VIEW2.VIEW1.sum(b)]), filter(nil), rowset=16
access([VIEW2.VIEW1.sum(b)])
5 - output([VIEW1.sum(b)]), filter(nil), rowset=16
distinct([VIEW1.sum(b)])
6 - output([VIEW1.sum(b)]), filter(nil), rowset=16
conds(nil), nl_params_(nil), use_batch=false
7 - output([VIEW1.sum(b)]), filter(nil), rowset=16
access([VIEW1.sum(b)])
8 - output([T_FUN_SUM(T_FUN_SUM(t2.b))]), filter([T_FUN_SUM(T_FUN_SUM(t2.b)) > cast(4, DECIMAL_INT(33, 0))]), rowset=16
group(nil), agg_func([T_FUN_SUM(T_FUN_SUM(t2.b))])
9 - output([T_FUN_SUM(t2.b)]), filter(nil), rowset=16
access([t2.b]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([t2.a]), range(MIN ; MAX)always true,
pushdown_aggregation([T_FUN_SUM(t2.b)])
10 - output(nil), filter(nil), rowset=16
access(nil), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([t1.a]), range(MIN ; MAX)always true
select (select sum(b) from t2) as temp from t1 group by temp having temp > 4 and temp > (select sum(b) from t3);
+------+
| temp |
@ -604,13 +590,12 @@ Query Plan
==============================================================
|ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)|
--------------------------------------------------------------
|0 |HASH DISTINCT | |1 |3 |
|1 |└─NESTED-LOOP JOIN CARTESIAN | |1 |3 |
|2 | ├─TABLE FULL SCAN |t1 |3 |3 |
|3 | └─MATERIAL | |1 |3 |
|4 | └─SUBPLAN SCAN |VIEW1|1 |3 |
|5 | └─SCALAR GROUP BY | |1 |3 |
|6 | └─TABLE FULL SCAN |t2 |3 |3 |
|0 |HASH DISTINCT | |1 |6 |
|1 |└─NESTED-LOOP JOIN CARTESIAN | |1 |6 |
|2 | ├─SUBPLAN SCAN |VIEW1|1 |3 |
|3 | │ └─SCALAR GROUP BY | |1 |3 |
|4 | └─TABLE FULL SCAN |t2 |3 |3 |
|5 | └─TABLE FULL SCAN |t1 |3 |3 |
==============================================================
Outputs & filters:
-------------------------------------
@ -618,20 +603,19 @@ Outputs & filters:
distinct([VIEW1.sum(b)])
1 - output([VIEW1.sum(b)]), filter(nil), rowset=16
conds(nil), nl_params_(nil), use_batch=false
2 - output(nil), filter(nil), rowset=16
access(nil), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([t1.a]), range(MIN ; MAX)always true
3 - output([VIEW1.sum(b)]), filter(nil), rowset=16
4 - output([VIEW1.sum(b)]), filter(nil), rowset=16
2 - output([VIEW1.sum(b)]), filter(nil), rowset=16
access([VIEW1.sum(b)])
5 - output([T_FUN_SUM(T_FUN_SUM(t2.b))]), filter([T_FUN_SUM(T_FUN_SUM(t2.b)) > cast(4, DECIMAL_INT(33, 0))], [T_FUN_SUM(T_FUN_SUM(t2.b)) > T_FUN_SUM(T_FUN_SUM(t2.b))]), rowset=16
3 - output([T_FUN_SUM(T_FUN_SUM(t2.b))]), filter([T_FUN_SUM(T_FUN_SUM(t2.b)) > cast(4, DECIMAL_INT(33, 0))], [T_FUN_SUM(T_FUN_SUM(t2.b)) > T_FUN_SUM(T_FUN_SUM(t2.b))]), rowset=16
group(nil), agg_func([T_FUN_SUM(T_FUN_SUM(t2.b))])
6 - output([T_FUN_SUM(t2.b)]), filter(nil), rowset=16
4 - output([T_FUN_SUM(t2.b)]), filter(nil), rowset=16
access([t2.b]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([t2.a]), range(MIN ; MAX)always true,
pushdown_aggregation([T_FUN_SUM(t2.b)])
5 - output(nil), filter(nil), rowset=16
access(nil), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([t1.a]), range(MIN ; MAX)always true
select (select sum(b) from t2) as temp from t1 group by temp having temp > 4 and temp > (select sum(b) from t2);
+------+
| temp |
@ -644,31 +628,29 @@ Query Plan
============================================================
|ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)|
------------------------------------------------------------
|0 |NESTED-LOOP JOIN CARTESIAN | |1 |3 |
|1 |├─TABLE FULL SCAN |t1 |3 |3 |
|2 |└─MATERIAL | |1 |3 |
|3 | └─SUBPLAN SCAN |VIEW1|1 |3 |
|4 | └─SCALAR GROUP BY | |1 |3 |
|5 | └─TABLE FULL SCAN |t2 |3 |3 |
|0 |NESTED-LOOP JOIN CARTESIAN | |1 |6 |
|1 |├─SUBPLAN SCAN |VIEW1|1 |3 |
|2 |│ └─SCALAR GROUP BY | |1 |3 |
|3 | └─TABLE FULL SCAN |t2 |3 |3 |
|4 |└─TABLE FULL SCAN |t1 |3 |3 |
============================================================
Outputs & filters:
-------------------------------------
0 - output([VIEW1.sum(b)], [t1.a]), filter(nil), rowset=16
conds(nil), nl_params_(nil), use_batch=false
1 - output([t1.a]), filter(nil), rowset=16
access([t1.a]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([t1.a]), range(MIN ; MAX)always true
2 - output([VIEW1.sum(b)]), filter(nil), rowset=16
3 - output([VIEW1.sum(b)]), filter(nil), rowset=16
1 - output([VIEW1.sum(b)]), filter(nil), rowset=16
access([VIEW1.sum(b)])
4 - output([T_FUN_SUM(T_FUN_SUM(t2.b))]), filter([T_FUN_SUM(T_FUN_SUM(t2.b)) > cast(4, DECIMAL_INT(33, 0))]), rowset=16
2 - output([T_FUN_SUM(T_FUN_SUM(t2.b))]), filter([T_FUN_SUM(T_FUN_SUM(t2.b)) > cast(4, DECIMAL_INT(33, 0))]), rowset=16
group(nil), agg_func([T_FUN_SUM(T_FUN_SUM(t2.b))])
5 - output([T_FUN_SUM(t2.b)]), filter(nil), rowset=16
3 - output([T_FUN_SUM(t2.b)]), filter(nil), rowset=16
access([t2.b]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([t2.a]), range(MIN ; MAX)always true,
pushdown_aggregation([T_FUN_SUM(t2.b)])
4 - output([t1.a]), filter(nil), rowset=16
access([t1.a]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([t1.a]), range(MIN ; MAX)always true
select (select sum(b) from t2) as temp, a from t1 group by a having temp > 4;
+------+---+
| temp | a |
@ -1413,43 +1395,42 @@ FROM
t2
WHERE v1.s_c2 >= t2.c2 and v1.c1 = t2.c1;
Query Plan
=======================================================
|ID|OPERATOR |NAME|EST.ROWS|EST.TIME(us)|
-------------------------------------------------------
|0 |NESTED-LOOP JOIN | |1 |3 |
|1 |├─TABLE FULL SCAN |t2 |1 |3 |
|2 |└─MATERIAL | |1 |7 |
|3 | └─SUBPLAN SCAN |v1 |1 |7 |
|4 | └─SUBPLAN FILTER | |1 |7 |
|5 | ─TABLE FULL SCAN|t1 |1 |3 |
|6 | ├─TABLE FULL SCAN|t3 |1 |3 |
|7 | └─TABLE FULL SCAN|t3 |1 |3 |
=======================================================
====================================================================
|ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)|
--------------------------------------------------------------------
|0 |NESTED-LOOP JOIN | |1 |28 |
|1 |├─SUBPLAN SCAN |v1 |1 |7 |
|2 |│ └─SUBPLAN FILTER | |1 |7 |
|3 | ├─TABLE FULL SCAN |t1 |1 |3 |
|4 | ├─TABLE FULL SCAN |t3 |1 |3 |
|5 | ─TABLE FULL SCAN |t3 |1 |3 |
|6 |└─DISTRIBUTED TABLE RANGE SCAN|t2(idx_c1)|1 |20 |
====================================================================
Outputs & filters:
-------------------------------------
0 - output([v1.c1], [v1.s_c1], [v1.s_c2], [t2.c1], [t2.c2]), filter(nil), rowset=16
conds([v1.s_c2 >= t2.c2], [v1.c1 = t2.c1]), nl_params_(nil), use_batch=false
1 - output([t2.c2], [t2.c1]), filter(nil), rowset=16
access([t2.c2], [t2.c1]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([t2.__pk_increment]), range(MIN ; MAX)always true
2 - output([v1.c1], [v1.s_c1], [v1.s_c2]), filter(nil), rowset=16
3 - output([v1.s_c2], [v1.c1], [v1.s_c1]), filter(nil), rowset=16
conds(nil), nl_params_([v1.s_c2(:2)], [v1.c1(:3)]), use_batch=true
1 - output([v1.s_c2], [v1.c1], [v1.s_c1]), filter(nil), rowset=16
access([v1.s_c2], [v1.c1], [v1.s_c1])
4 - output([t1.c1], [:0], [:1]), filter(nil), rowset=16
2 - output([t1.c1], [:0], [:1]), filter(nil), rowset=16
exec_params_(nil), onetime_exprs_([subquery(1)(:0)], [subquery(2)(:1)]), init_plan_idxs_(nil), use_batch=false
5 - output([t1.c1]), filter(nil), rowset=16
3 - output([t1.c1]), filter(nil), rowset=16
access([t1.c1]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([t1.__pk_increment]), range(MIN ; MAX)always true
6 - output([t3.c1]), filter(nil), rowset=16
4 - output([t3.c1]), filter(nil), rowset=16
access([t3.c1]), partitions(p0)
limit(1), offset(nil), is_index_back=false, is_global_index=false,
range_key([t3.__pk_increment]), range(MIN ; MAX)always true
7 - output([t3.c2]), filter(nil), rowset=16
5 - output([t3.c2]), filter(nil), rowset=16
access([t3.c2]), partitions(p0)
limit(1), offset(nil), is_index_back=false, is_global_index=false,
range_key([t3.__pk_increment]), range(MIN ; MAX)always true
6 - output([t2.c2], [t2.c1]), filter([:2 >= t2.c2]), rowset=16
access([GROUP_ID], [t2.__pk_increment], [t2.c2], [t2.c1]), partitions(p0)
is_index_back=true, is_global_index=false, filter_before_indexback[false],
range_key([t2.c1], [t2.__pk_increment]), range(MIN ; MAX),
range_cond([:3 = t2.c1])
SELECT /*+use_nl(t2 v1)*/ *
FROM
(SELECT /*+no_merge*, no_rewrite, full(t1)*/