refine large size query range

This commit is contained in:
zs0
2021-11-01 10:30:45 +08:00
committed by LINxiansheng
parent 766929ee4f
commit 9ff1baa323
27 changed files with 425 additions and 231 deletions

View File

@ -9100,9 +9100,9 @@ SQL: SELECT (select max(t1.c1) from t1) as field from t1 group by field;
----------------------------------------------------------------
|0 |HASH GROUP BY | |1 |880 |
|1 | NESTED-LOOP JOIN CARTESIAN | |500 |715 |
|2 | SUBPLAN SCAN |VIEW4 |1 |38 |
|2 | SUBPLAN SCAN |VIEW3 |1 |38 |
|3 | SCALAR GROUP BY | |1 |38 |
|4 | SUBPLAN SCAN |VIEW5 |1 |37 |
|4 | SUBPLAN SCAN |VIEW4 |1 |37 |
|5 | LIMIT | |1 |37 |
|6 | PX COORDINATOR MERGE SORT | |1 |37 |
|7 | EXCHANGE OUT DISTR |:EX10000 |1 |37 |
@ -9118,16 +9118,16 @@ SQL: SELECT (select max(t1.c1) from t1) as field from t1 group by field;
Outputs & filters:
-------------------------------------
0 - output([VIEW4.max(t1.c1)]), filter(nil),
group([VIEW4.max(t1.c1)]), agg_func(nil)
1 - output([VIEW4.max(t1.c1)]), filter(nil),
0 - output([VIEW3.max(t1.c1)]), filter(nil),
group([VIEW3.max(t1.c1)]), agg_func(nil)
1 - output([VIEW3.max(t1.c1)]), filter(nil),
conds(nil), nl_params_(nil), batch_join=false
2 - output([VIEW4.max(t1.c1)]), filter(nil),
access([VIEW4.max(t1.c1)])
3 - output([T_FUN_MAX(VIEW5.c1)]), filter(nil),
group(nil), agg_func([T_FUN_MAX(VIEW5.c1)])
4 - output([VIEW5.c1]), filter(nil),
access([VIEW5.c1])
2 - output([VIEW3.max(t1.c1)]), filter(nil),
access([VIEW3.max(t1.c1)])
3 - output([T_FUN_MAX(VIEW4.c1)]), filter(nil),
group(nil), agg_func([T_FUN_MAX(VIEW4.c1)])
4 - output([VIEW4.c1]), filter(nil),
access([VIEW4.c1])
5 - output([t1.c1]), filter(nil), limit(1), offset(nil)
6 - output([t1.c1]), filter(nil), sort_keys([t1.c1, DESC])
7 - output([t1.c1]), filter(nil), dop=1
@ -26645,47 +26645,51 @@ SQL: select * from t1 where t1.c2 = 5 or exists (select 1 from t2 where t1.c1 =
==================================================================
|ID|OPERATOR |NAME |EST. ROWS|COST|
------------------------------------------------------------------
|0 |PX COORDINATOR | |750 |1893|
|1 | EXCHANGE OUT DISTR |:EX10001 |750 |1786|
|2 | UNION ALL | |750 |1786|
|0 |UNION ALL | |750 |1869|
|1 | PX COORDINATOR | |500 |389 |
|2 | EXCHANGE OUT DISTR |:EX10000 |500 |342 |
|3 | PX PARTITION ITERATOR | |500 |342 |
|4 | TABLE SCAN |t1(idx_t1_c2)|500 |342 |
|5 | MERGE JOIN | |251 |1158|
|6 | SORT | |250 |729 |
|7 | PX PARTITION ITERATOR | |250 |384 |
|8 | TABLE SCAN |t1 |250 |384 |
|9 | EXCHANGE IN MERGE SORT DISTR| |300 |206 |
|10| EXCHANGE OUT DISTR (PKEY) |:EX10000 |300 |192 |
|11| PX PARTITION ITERATOR | |300 |192 |
|12| TABLE SCAN |t2 |300 |192 |
|5 | PX COORDINATOR | |251 |1194|
|6 | EXCHANGE OUT DISTR |:EX20001 |251 |1158|
|7 | MERGE JOIN | |251 |1158|
|8 | SORT | |250 |729 |
|9 | PX PARTITION ITERATOR | |250 |384 |
|10| TABLE SCAN |t1 |250 |384 |
|11| EXCHANGE IN MERGE SORT DISTR| |300 |206 |
|12| EXCHANGE OUT DISTR (PKEY) |:EX20000 |300 |192 |
|13| PX PARTITION ITERATOR | |300 |192 |
|14| TABLE SCAN |t2 |300 |192 |
==================================================================
Outputs & filters:
-------------------------------------
0 - output([UNION([1])], [UNION([2])]), filter(nil)
1 - output([UNION([1])], [UNION([2])]), filter(nil), dop=1
2 - output([UNION([1])], [UNION([2])]), filter(nil)
1 - output([t1.c1], [t1.c2]), filter(nil)
2 - output([t1.c1], [t1.c2]), filter(nil), dop=1
3 - output([t1.c1], [t1.c2]), filter(nil),
affinitize, partition wise, force partition granule, asc.
force partition granule, asc.
4 - 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(5,MIN ; 5,MAX),
range_cond([t1.c2 = ?])
5 - output([t1.c1], [t1.c2]), filter(nil),
equal_conds([t1.c1 = t2.c1]), other_conds(nil)
6 - output([t1.c1], [t1.c2]), filter(nil), sort_keys([t1.c1, ASC]), local merge sort
5 - output([t1.c1], [t1.c2]), filter(nil)
6 - output([t1.c1], [t1.c2]), filter(nil), dop=1
7 - output([t1.c1], [t1.c2]), filter(nil),
affinitize, partition wise, force partition granule, asc.
8 - output([t1.c1], [t1.c2]), filter([lnnvl(t1.c2 = ?)]),
equal_conds([t1.c1 = t2.c1]), other_conds(nil)
8 - output([t1.c1], [t1.c2]), filter(nil), sort_keys([t1.c1, ASC]), local merge sort
9 - output([t1.c1], [t1.c2]), filter(nil),
affinitize, force partition granule, asc.
10 - output([t1.c1], [t1.c2]), filter([lnnvl(t1.c2 = ?)]),
access([t1.c1], [t1.c2]), partitions(p[0-4]),
is_index_back=false, filter_before_indexback[false],
range_key([t1.c1]), range(MIN ; MAX)always true
9 - output([t2.c1]), filter(nil), sort_keys([t2.c1, ASC]), Local Order
10 - (#keys=1, [t2.c1]), output([t2.c1]), filter(nil), dop=1
11 - output([t2.c1]), filter(nil),
11 - output([t2.c1]), filter(nil), sort_keys([t2.c1, ASC]), Local Order
12 - (#keys=1, [t2.c1]), output([t2.c1]), filter(nil), dop=1
13 - output([t2.c1]), filter(nil),
force partition granule, asc.
12 - output([t2.c1]), filter(nil),
14 - 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