*************** Case 1 *************** SQL: explain extended select * from t1 order by c1,c2 limit 100; ======================================================== |ID|OPERATOR |NAME |EST. ROWS|COST| -------------------------------------------------------- |0 |LIMIT | |100 |279 | |1 | PX COORDINATOR MERGE SORT | |100 |278 | |2 | EXCHANGE OUT DISTR |:EX10000|100 |268 | |3 | TOP-N SORT | |100 |250 | |4 | PX PARTITION ITERATOR | |100 |229 | |5 | TABLE SCAN |t1 |100 |229 | ======================================================== Outputs & filters: ------------------------------------- 0 - output([t1.c1], [t1.c2]), filter(nil), limit(100), offset(nil) 1 - output([t1.c1], [t1.c2]), filter(nil), sort_keys([t1.c1, ASC]) 2 - output([t1.c1], [t1.c2]), filter(nil), dop=1 3 - output([t1.c1], [t1.c2]), filter(nil), sort_keys([t1.c1, ASC]), topn(100), local merge sort 4 - output([t1.c1], [t1.c2]), filter(nil), force partition granule. 5 - output([t1.c1], [t1.c2]), filter(nil), access([t1.c1], [t1.c2]), partitions(p[0-4]), limit(100), offset(nil), is_index_back=false, range_key([t1.c1]), range(MIN ; MAX)always true *************** Case 1(end) ************** *************** Case 2 *************** SQL: explain extended select c2, sum(c1) from t1 group by c2; ================================================================= |ID|OPERATOR |NAME |EST. ROWS|COST| ----------------------------------------------------------------- |0 |PX COORDINATOR | |100 |528 | |1 | EXCHANGE OUT DISTR |:EX10001 |100 |509 | |2 | MERGE GROUP BY | |100 |469 | |3 | EXCHANGE IN MERGE SORT DISTR| |100 |462 | |4 | EXCHANGE OUT DISTR (HASH) |:EX10000 |100 |448 | |5 | PX PARTITION ITERATOR | |100 |418 | |6 | MERGE GROUP BY | |100 |418 | |7 | TABLE SCAN |t1(idx_t1_c2)|500 |387 | ================================================================= Outputs & filters: ------------------------------------- 0 - output([INTERNAL_FUNCTION(t1.c2, T_FUN_SUM(T_FUN_SUM(t1.c1)))]), filter(nil) 1 - output([INTERNAL_FUNCTION(t1.c2, T_FUN_SUM(T_FUN_SUM(t1.c1)))]), filter(nil), dop=1 2 - output([t1.c2], [T_FUN_SUM(T_FUN_SUM(t1.c1))]), filter(nil), group([t1.c2]), agg_func([T_FUN_SUM(T_FUN_SUM(t1.c1))]) 3 - output([t1.c2], [T_FUN_SUM(t1.c1)]), filter(nil), sort_keys([t1.c2, ASC]), Local Order 4 - (#keys=1, [t1.c2]), output([t1.c2], [T_FUN_SUM(t1.c1)]), filter(nil), dop=1 5 - output([t1.c2], [T_FUN_SUM(t1.c1)]), filter(nil), force partition granule. 6 - output([t1.c2], [T_FUN_SUM(t1.c1)]), filter(nil), group([t1.c2]), agg_func([T_FUN_SUM(t1.c1)]) 7 - output([t1.c1], [t1.c2]), filter(nil), access([t1.c1], [t1.c2]), partitions(p[0-4]), is_index_back=false, range_key([t1.c2], [t1.c1]), range(MIN,MIN ; MAX,MAX)always true *************** Case 2(end) ************** *************** Case 3 *************** SQL: explain extended select t1.c1 from t1,t2,t3, t1 tt where t1.c1=t3.c1 and t1.c2=tt.c2 and t1.c1+t2.c1=tt.c1; ============================================================ |ID|OPERATOR |NAME |EST. ROWS|COST| ------------------------------------------------------------ |0 |NESTED-LOOP JOIN | |487 |7244| |1 | HASH JOIN | |811 |1519| |2 | PX COORDINATOR | |200 |822 | |3 | EXCHANGE OUT DISTR |:EX10001|200 |796 | |4 | HASH JOIN | |200 |741 | |5 | EXCHANGE IN DISTR | |200 |187 | |6 | EXCHANGE OUT DISTR (PKEY)|:EX10000|200 |176 | |7 | PX PARTITION ITERATOR | |200 |155 | |8 | TABLE SCAN |t3 |200 |155 | |9 | PX PARTITION ITERATOR | |500 |387 | |10| TABLE SCAN |t1 |500 |387 | |11| PX COORDINATOR | |500 |528 | |12| EXCHANGE OUT DISTR |:EX20000|500 |481 | |13| PX PARTITION ITERATOR | |500 |387 | |14| TABLE SCAN |tt |500 |387 | |15| MATERIAL | |300 |281 | |16| PX COORDINATOR | |300 |280 | |17| EXCHANGE OUT DISTR |:EX30000|300 |263 | |18| PX PARTITION ITERATOR | |300 |233 | |19| TABLE SCAN |t2 |300 |233 | ============================================================ Outputs & filters: ------------------------------------- 0 - output([t1.c1]), filter(nil), conds([t1.c1 + t2.c1 = tt.c1]), nl_params_(nil), batch_join=false 1 - output([t1.c1], [tt.c1]), filter(nil), equal_conds([t1.c2 = tt.c2]), other_conds(nil) 2 - output([t1.c1], [t1.c2]), filter(nil) 3 - output([t1.c1], [t1.c2]), filter(nil), dop=1 4 - output([t1.c1], [t1.c2]), filter(nil), equal_conds([t1.c1 = t3.c1]), other_conds(nil) 5 - output([t3.c1]), filter(nil) 6 - (#keys=1, [t3.c1]), output([t3.c1]), filter(nil), dop=1 7 - output([t3.c1]), filter(nil), force partition granule. 8 - output([t3.c1]), filter(nil), access([t3.c1]), partitions(p[0-1]), is_index_back=false, range_key([t3.c1]), range(MIN ; MAX)always true 9 - output([t1.c1], [t1.c2]), filter(nil), affinitize, force partition granule. 10 - output([t1.c1], [t1.c2]), filter(nil), access([t1.c1], [t1.c2]), partitions(p[0-4]), is_index_back=false, range_key([t1.c1]), range(MIN ; MAX)always true 11 - output([tt.c1], [tt.c2]), filter(nil) 12 - output([tt.c1], [tt.c2]), filter(nil), dop=1 13 - output([tt.c1], [tt.c2]), filter(nil), force partition granule. 14 - output([tt.c1], [tt.c2]), filter(nil), access([tt.c1], [tt.c2]), partitions(p[0-4]), is_index_back=false, range_key([tt.c1]), range(MIN ; MAX)always true 15 - output([t2.c1]), filter(nil) 16 - output([t2.c1]), filter(nil) 17 - output([t2.c1]), filter(nil), dop=1 18 - output([t2.c1]), filter(nil), force partition granule. 19 - output([t2.c1]), filter(nil), access([t2.c1]), partitions(p[0-2]), is_index_back=false, range_key([t2.c1]), range(MIN ; MAX)always true *************** Case 3(end) ************** *************** Case 4 *************** SQL: explain extended select t1.c1 from t1, (select * from t2 where c2>1 order by c1 limit 10) as t where t1.c1=t.c1; ================================================================ |ID|OPERATOR |NAME |EST. ROWS|COST| ---------------------------------------------------------------- |0 |PX COORDINATOR | |10 |213 | |1 | EXCHANGE OUT DISTR |:EX10002|10 |212 | |2 | NESTED-LOOP JOIN | |10 |210 | |3 | EXCHANGE IN DISTR | |10 |144 | |4 | EXCHANGE OUT DISTR (PKEY) |:EX10001|10 |143 | |5 | SUBPLAN SCAN |t |10 |142 | |6 | LIMIT | |10 |142 | |7 | EXCHANGE IN MERGE SORT DISTR| |10 |142 | |8 | EXCHANGE OUT DISTR |:EX10000|10 |141 | |9 | TOP-N SORT | |10 |139 | |10| PX PARTITION ITERATOR | |10 |137 | |11| TABLE SCAN |t2 |10 |137 | |12| PX PARTITION ITERATOR | |1 |29 | |13| TABLE GET |t1 |1 |29 | ================================================================ Outputs & filters: ------------------------------------- 0 - output([INTERNAL_FUNCTION(t1.c1)]), filter(nil) 1 - output([INTERNAL_FUNCTION(t1.c1)]), filter(nil), dop=1 2 - output([t1.c1]), filter(nil), conds(nil), nl_params_([t.c1]), batch_join=false 3 - output([PARTITION_ID], [t.c1]), filter(nil) 4 - (#keys=1, [t.c1]), output([PARTITION_ID], [t.c1]), filter(nil), is_single, dop=1 5 - output([t.c1]), filter(nil), access([t.c1]) 6 - output([t2.c1]), filter(nil), limit(10), offset(nil) 7 - output([t2.c1]), filter(nil), sort_keys([t2.c1, ASC]) 8 - output([t2.c1]), filter(nil), dop=1 9 - output([t2.c1]), filter(nil), sort_keys([t2.c1, ASC]), topn(10), local merge sort 10 - output([t2.c1]), filter(nil), force partition granule. 11 - output([t2.c1]), filter([t2.c2 > 1]), access([t2.c1], [t2.c2]), partitions(p[0-2]), limit(10), offset(nil), is_index_back=false, filter_before_indexback[false], range_key([t2.c1]), range(MIN ; MAX)always true 12 - output([t1.c1]), filter(nil), affinitize, force partition granule. 13 - output([t1.c1]), filter(nil), access([t1.c1]), partitions(p[0-4]), is_index_back=false, range_key([t1.c1]), range(MIN ; MAX), range_cond([t1.c1 = ?]) *************** Case 4(end) ************** *************** Case 5 *************** SQL: explain extended select t1.c1 from t1 left join t2 t on t1.c1=t.c1,t2,t3, t1 tt where t1.c1=t3.c1 and t1.c2=tt.c2 and t1.c1+t2.c1=tt.c1; ============================================================ |ID|OPERATOR |NAME |EST. ROWS|COST| ------------------------------------------------------------ |0 |NESTED-LOOP JOIN | |487 |7244| |1 | HASH JOIN | |811 |1519| |2 | PX COORDINATOR | |200 |822 | |3 | EXCHANGE OUT DISTR |:EX10001|200 |796 | |4 | HASH JOIN | |200 |741 | |5 | EXCHANGE IN DISTR | |200 |187 | |6 | EXCHANGE OUT DISTR (PKEY)|:EX10000|200 |176 | |7 | PX PARTITION ITERATOR | |200 |155 | |8 | TABLE SCAN |t3 |200 |155 | |9 | PX PARTITION ITERATOR | |500 |387 | |10| TABLE SCAN |t1 |500 |387 | |11| PX COORDINATOR | |500 |528 | |12| EXCHANGE OUT DISTR |:EX20000|500 |481 | |13| PX PARTITION ITERATOR | |500 |387 | |14| TABLE SCAN |tt |500 |387 | |15| MATERIAL | |300 |281 | |16| PX COORDINATOR | |300 |280 | |17| EXCHANGE OUT DISTR |:EX30000|300 |263 | |18| PX PARTITION ITERATOR | |300 |233 | |19| TABLE SCAN |t2 |300 |233 | ============================================================ Outputs & filters: ------------------------------------- 0 - output([t1.c1]), filter(nil), conds([t1.c1 + t2.c1 = tt.c1]), nl_params_(nil), batch_join=false 1 - output([t1.c1], [tt.c1]), filter(nil), equal_conds([t1.c2 = tt.c2]), other_conds(nil) 2 - output([t1.c1], [t1.c2]), filter(nil) 3 - output([t1.c1], [t1.c2]), filter(nil), dop=1 4 - output([t1.c1], [t1.c2]), filter(nil), equal_conds([t1.c1 = t3.c1]), other_conds(nil) 5 - output([t3.c1]), filter(nil) 6 - (#keys=1, [t3.c1]), output([t3.c1]), filter(nil), dop=1 7 - output([t3.c1]), filter(nil), force partition granule. 8 - output([t3.c1]), filter(nil), access([t3.c1]), partitions(p[0-1]), is_index_back=false, range_key([t3.c1]), range(MIN ; MAX)always true 9 - output([t1.c1], [t1.c2]), filter(nil), affinitize, force partition granule. 10 - output([t1.c1], [t1.c2]), filter(nil), access([t1.c1], [t1.c2]), partitions(p[0-4]), is_index_back=false, range_key([t1.c1]), range(MIN ; MAX)always true 11 - output([tt.c1], [tt.c2]), filter(nil) 12 - output([tt.c1], [tt.c2]), filter(nil), dop=1 13 - output([tt.c1], [tt.c2]), filter(nil), force partition granule. 14 - output([tt.c1], [tt.c2]), filter(nil), access([tt.c1], [tt.c2]), partitions(p[0-4]), is_index_back=false, range_key([tt.c1]), range(MIN ; MAX)always true 15 - output([t2.c1]), filter(nil) 16 - output([t2.c1]), filter(nil) 17 - output([t2.c1]), filter(nil), dop=1 18 - output([t2.c1]), filter(nil), force partition granule. 19 - output([t2.c1]), filter(nil), access([t2.c1]), partitions(p[0-2]), is_index_back=false, range_key([t2.c1]), range(MIN ; MAX)always true *************** Case 5(end) **************