diff options
author | unknown <sergefp@mysql.com> | 2006-01-04 11:09:01 +0300 |
---|---|---|
committer | unknown <sergefp@mysql.com> | 2006-01-04 11:09:01 +0300 |
commit | dc2a6e226d4d31ba976061538c4b469ab8596a2b (patch) | |
tree | 4ea8a914fa12cca3d8ad46e0c42492a7b099eebc /mysql-test/r/partition_pruning.result | |
parent | 78d1abbaf9c016843c0880edc60d084f5079d9e2 (diff) | |
download | mariadb-git-dc2a6e226d4d31ba976061538c4b469ab8596a2b.tar.gz |
WL#2985 "Partition Pruning":
- post-...-post review fixes
- Added "integer range walking" that allows to do partition pruning for "a <=? t.field <=? b"
by finding used partitions for a, a+1, a+2, ..., b-1, b.
mysql-test/r/partition_pruning.result:
WL#2985 "Partition Pruning": tests for "integer range walking"
mysql-test/t/partition.test:
WL#2985 "Partition Pruning": post-review fixes
mysql-test/t/partition_pruning.test:
WL#2985 "Partition Pruning": tests for "integer range walking"
sql/handler.h:
WL#2985 "Partition Pruning": "integer range walking":
- class partition_info now has pointers to "partitioning interval analysis" functions
- added "partition set iterator" definitions.
sql/opt_range.cc:
WL#2985 "Partition Pruning": "integer range walking":
- Switched to use "partitioning interval analysis" functions
- Fixed two problems in find_used_partitions() that occur on complicated WHERE clauses.
sql/sql_partition.cc:
WL#2985 "Partition Pruning": "integer range walking":
- Added "partitioning interval analysis" functions: get_part_iter_for_interval_via_mapping,
get_part_iter_for_interval_via_walking,
- Added appropriate partition-set-iterator implementations
- Added a function to set up Partitioning Interval Analysis-related fields in partition_info.
sql/sql_select.cc:
WL#2985 "Partition pruning": added comments.
Diffstat (limited to 'mysql-test/r/partition_pruning.result')
-rw-r--r-- | mysql-test/r/partition_pruning.result | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/mysql-test/r/partition_pruning.result b/mysql-test/r/partition_pruning.result index ef431b2c00e..6f210a76778 100644 --- a/mysql-test/r/partition_pruning.result +++ b/mysql-test/r/partition_pruning.result @@ -274,3 +274,33 @@ id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE X p1,p2 ALL a NULL NULL NULL 4 Using where 1 SIMPLE Y p1,p2 ref a a 4 test.X.a 2 drop table t1; +create table t1 (a int) partition by hash(a) partitions 20; +insert into t1 values (1),(2),(3); +explain partitions select * from t1 where a > 1 and a < 3; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p2 ALL NULL NULL NULL NULL 3 Using where +explain partitions select * from t1 where a >= 1 and a < 3; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p1,p2 ALL NULL NULL NULL NULL 3 Using where +explain partitions select * from t1 where a > 1 and a <= 3; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p2,p3 ALL NULL NULL NULL NULL 3 Using where +explain partitions select * from t1 where a >= 1 and a <= 3; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p1,p2,p3 ALL NULL NULL NULL NULL 3 Using where +drop table t1; +create table t1 (a int, b int) +partition by list(a) subpartition by hash(b) subpartitions 20 +( +partition p0 values in (0), +partition p1 values in (1), +partition p2 values in (2), +partition p3 values in (3) +); +insert into t1 values (1,1),(2,2),(3,3); +explain partitions select * from t1 where b > 1 and b < 3; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0_sp2,p1_sp2,p2_sp2,p3_sp2 ALL NULL NULL NULL NULL 3 Using where +explain partitions select * from t1 where b > 1 and b < 3 and (a =1 or a =2); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p1_sp2,p2_sp2 ALL NULL NULL NULL NULL 3 Using where |