[CP] Bugfix:compare sharding info when pruning indexes
This commit is contained in:
@ -114,22 +114,16 @@ create table t8 (c1 BINARY(99) ,c2 INTEGER(127) ,c3 VARBINARY(71) ,c4 BINARY(65)
|
||||
insert into t8 values('cdxLVdvvJjcoHFBECqXKkRGoMXYgNsTpJRrqYaluQdfEeB00000',0,'RetSgyIigYXIPgBXBsmZHQZQPLWcGoELCf00000','wD00000',0,0,0,0,0.0000000000000000000000000,'ieLhJAFmNCq00000',0,'DcKPncNvJjyYcNJKFmVUVhqvgUlLfINbycifYNHjzqALoLfn00000',0,0,0,0.000000000000000,0,'MojimRsQZuotWXMuvSQVDSdCmOaloSXNLRTxMYYXaxGbtuk00000',0);
|
||||
explain (select /*+USE_HASH_AGGREGATION*/ c15 from (select c15 from t8) except (select c15 from t8) order by 1 limit 1000) union all (select t8_alias1.c10 from t8 t8_alias1 limit 1);
|
||||
Query Plan
|
||||
================================================================================
|
||||
|ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)|
|
||||
--------------------------------------------------------------------------------
|
||||
|0 |UNION ALL | |2 |88 |
|
||||
|1 |├─TOP-N SORT | |1 |86 |
|
||||
|2 |│ └─HASH EXCEPT DISTINCT | |1 |86 |
|
||||
|3 |│ ├─PX COORDINATOR | |1 |43 |
|
||||
|4 |│ │ └─EXCHANGE OUT DISTR |:EX10000 |1 |43 |
|
||||
|5 |│ │ └─PX PARTITION ITERATOR| |1 |43 |
|
||||
|6 |│ │ └─TABLE FULL SCAN |t8 |1 |43 |
|
||||
|7 |│ └─PX COORDINATOR | |1 |43 |
|
||||
|8 |│ └─EXCHANGE OUT DISTR |:EX20000 |1 |43 |
|
||||
|9 |│ └─PX PARTITION ITERATOR| |1 |43 |
|
||||
|10|│ └─TABLE FULL SCAN |t8 |1 |43 |
|
||||
|11|└─DISTRIBUTED TABLE FULL SCAN |t8_alias1(i_ahayugXY)|1 |3 |
|
||||
================================================================================
|
||||
==================================================================================
|
||||
|ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)|
|
||||
----------------------------------------------------------------------------------
|
||||
|0 |UNION ALL | |2 |14 |
|
||||
|1 |├─TOP-N SORT | |1 |12 |
|
||||
|2 |│ └─HASH EXCEPT DISTINCT | |1 |12 |
|
||||
|3 |│ ├─DISTRIBUTED TABLE FULL SCAN|t8(i_OkcN) |1 |6 |
|
||||
|4 |│ └─DISTRIBUTED TABLE FULL SCAN|t8(i_OkcN) |1 |6 |
|
||||
|5 |└─DISTRIBUTED TABLE FULL SCAN |t8_alias1(i_ahayugXY)|1 |3 |
|
||||
==================================================================================
|
||||
Outputs & filters:
|
||||
-------------------------------------
|
||||
0 - output([UNION([1])]), filter(nil), rowset=16
|
||||
@ -137,24 +131,14 @@ Outputs & filters:
|
||||
sort_keys([EXCEPT([1]), ASC]), topn(1000)
|
||||
2 - output([EXCEPT([1])], [cast(EXCEPT([1]), VARCHAR(127))]), filter(nil), rowset=16
|
||||
3 - output([t8.c15]), filter(nil), rowset=16
|
||||
access([t8.c7], [t8.c6], [t8.c15]), partitions(p0)
|
||||
is_index_back=true, is_global_index=true,
|
||||
range_key([t8.c19], [t8.c7], [t8.c6]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
|
||||
4 - output([t8.c15]), filter(nil), rowset=16
|
||||
dop=1
|
||||
5 - output([t8.c15]), filter(nil), rowset=16
|
||||
force partition granule
|
||||
6 - output([t8.c15]), filter(nil), rowset=16
|
||||
access([t8.c15]), partitions(p[0-19])
|
||||
is_index_back=false, is_global_index=false,
|
||||
range_key([t8.c7], [t8.c6]), range(MIN,MIN ; MAX,MAX)always true
|
||||
7 - output([t8.c15]), filter(nil), rowset=16
|
||||
8 - output([t8.c15]), filter(nil), rowset=16
|
||||
dop=1
|
||||
9 - output([t8.c15]), filter(nil), rowset=16
|
||||
force partition granule
|
||||
10 - output([t8.c15]), filter(nil), rowset=16
|
||||
access([t8.c15]), partitions(p[0-19])
|
||||
is_index_back=false, is_global_index=false,
|
||||
range_key([t8.c7], [t8.c6]), range(MIN,MIN ; MAX,MAX)always true
|
||||
11 - output([t8_alias1.c10]), filter(nil), rowset=16
|
||||
access([t8.c7], [t8.c6], [t8.c15]), partitions(p0)
|
||||
is_index_back=true, is_global_index=true,
|
||||
range_key([t8.c19], [t8.c7], [t8.c6]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
|
||||
5 - output([t8_alias1.c10]), filter(nil), rowset=16
|
||||
access([t8_alias1.c10]), partitions(p0)
|
||||
limit(1), offset(nil), is_index_back=false, is_global_index=true,
|
||||
range_key([t8_alias1.c10], [t8_alias1.c18], [t8_alias1.c7], [t8_alias1.c6]), range(MIN,MIN,MIN,MIN ; MAX,MAX,MAX,MAX)always true
|
||||
@ -163,22 +147,16 @@ c15
|
||||
ieLhJAFmNCq00000
|
||||
explain (select /*+USE_HASH_AGGREGATION*/ c15 from (select c15 from t8) intersect (select c15 from t8) order by 1 limit 1000) union all (select t8_alias1.c10 from t8 t8_alias1 limit 1);
|
||||
Query Plan
|
||||
================================================================================
|
||||
|ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)|
|
||||
--------------------------------------------------------------------------------
|
||||
|0 |UNION ALL | |2 |88 |
|
||||
|1 |├─TOP-N SORT | |1 |86 |
|
||||
|2 |│ └─HASH INTERSECT DISTINCT | |1 |86 |
|
||||
|3 |│ ├─PX COORDINATOR | |1 |43 |
|
||||
|4 |│ │ └─EXCHANGE OUT DISTR |:EX10000 |1 |43 |
|
||||
|5 |│ │ └─PX PARTITION ITERATOR| |1 |43 |
|
||||
|6 |│ │ └─TABLE FULL SCAN |t8 |1 |43 |
|
||||
|7 |│ └─PX COORDINATOR | |1 |43 |
|
||||
|8 |│ └─EXCHANGE OUT DISTR |:EX20000 |1 |43 |
|
||||
|9 |│ └─PX PARTITION ITERATOR| |1 |43 |
|
||||
|10|│ └─TABLE FULL SCAN |t8 |1 |43 |
|
||||
|11|└─DISTRIBUTED TABLE FULL SCAN |t8_alias1(i_ahayugXY)|1 |3 |
|
||||
================================================================================
|
||||
==================================================================================
|
||||
|ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)|
|
||||
----------------------------------------------------------------------------------
|
||||
|0 |UNION ALL | |2 |14 |
|
||||
|1 |├─TOP-N SORT | |1 |12 |
|
||||
|2 |│ └─HASH INTERSECT DISTINCT | |1 |12 |
|
||||
|3 |│ ├─DISTRIBUTED TABLE FULL SCAN|t8(i_OkcN) |1 |6 |
|
||||
|4 |│ └─DISTRIBUTED TABLE FULL SCAN|t8(i_OkcN) |1 |6 |
|
||||
|5 |└─DISTRIBUTED TABLE FULL SCAN |t8_alias1(i_ahayugXY)|1 |3 |
|
||||
==================================================================================
|
||||
Outputs & filters:
|
||||
-------------------------------------
|
||||
0 - output([UNION([1])]), filter(nil), rowset=16
|
||||
@ -186,24 +164,14 @@ Outputs & filters:
|
||||
sort_keys([INTERSECT([1]), ASC]), topn(1000)
|
||||
2 - output([INTERSECT([1])], [cast(INTERSECT([1]), VARCHAR(127))]), filter(nil), rowset=16
|
||||
3 - output([t8.c15]), filter(nil), rowset=16
|
||||
access([t8.c7], [t8.c6], [t8.c15]), partitions(p0)
|
||||
is_index_back=true, is_global_index=true,
|
||||
range_key([t8.c19], [t8.c7], [t8.c6]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
|
||||
4 - output([t8.c15]), filter(nil), rowset=16
|
||||
dop=1
|
||||
5 - output([t8.c15]), filter(nil), rowset=16
|
||||
force partition granule
|
||||
6 - output([t8.c15]), filter(nil), rowset=16
|
||||
access([t8.c15]), partitions(p[0-19])
|
||||
is_index_back=false, is_global_index=false,
|
||||
range_key([t8.c7], [t8.c6]), range(MIN,MIN ; MAX,MAX)always true
|
||||
7 - output([t8.c15]), filter(nil), rowset=16
|
||||
8 - output([t8.c15]), filter(nil), rowset=16
|
||||
dop=1
|
||||
9 - output([t8.c15]), filter(nil), rowset=16
|
||||
force partition granule
|
||||
10 - output([t8.c15]), filter(nil), rowset=16
|
||||
access([t8.c15]), partitions(p[0-19])
|
||||
is_index_back=false, is_global_index=false,
|
||||
range_key([t8.c7], [t8.c6]), range(MIN,MIN ; MAX,MAX)always true
|
||||
11 - output([t8_alias1.c10]), filter(nil), rowset=16
|
||||
access([t8.c7], [t8.c6], [t8.c15]), partitions(p0)
|
||||
is_index_back=true, is_global_index=true,
|
||||
range_key([t8.c19], [t8.c7], [t8.c6]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
|
||||
5 - output([t8_alias1.c10]), filter(nil), rowset=16
|
||||
access([t8_alias1.c10]), partitions(p0)
|
||||
limit(1), offset(nil), is_index_back=false, is_global_index=true,
|
||||
range_key([t8_alias1.c10], [t8_alias1.c18], [t8_alias1.c7], [t8_alias1.c6]), range(MIN,MIN,MIN,MIN ; MAX,MAX,MAX,MAX)always true
|
||||
|
||||
Reference in New Issue
Block a user