content_image/704538.jpg content_image/704544.jpg
Records: 3 Duplicates: 0 Warnings: 0 

mysql> SELECT PARTITION_NAME,TABLE_ROWS -> FROM INFORMATION_SCHEMA.PARTITIONS -> WHERE TABLE_NAME = ’rx’; 

<img src='content_image/704538.jpg'>

It is also possible to create tables partitioned by RANGE COLUMNS  where limiting values for one or more columns are repeated in successive partition definitions. You can do this as long as the tuples of column values used to define the partitions are strictly increasing. For example, each of the following CREATE TABLE  statements is valid: 

CREATE TABLE rc2 ( a INT, b INT ) PARTITION BY RANGE COLUMNS(a,b) ( PARTITION p0 VALUES LESS THAN (0,10), PARTITION p1 VALUES LESS THAN (10,20), PARTITION p2 VALUES LESS THAN (10,30), PARTITION p3 VALUES LESS THAN (MAXVALUE,MAXVALUE)  ); CREATE TABLE rc3 ( a INT, b INT ) PARTITION BY RANGE COLUMNS(a,b) ( PARTITION p0 VALUES LESS THAN (0,10), PARTITION p1 VALUES LESS THAN (10,20), PARTITION p2 VALUES LESS THAN (10,30), PARTITION p3 VALUES LESS THAN (10,35), PARTITION p4 VALUES LESS THAN (20,40), PARTITION p5 VALUES LESS THAN (MAXVALUE,MAXVALUE)  ); 

The following statement also succeeds, even though it might appear at first glance that it would not, since the limiting value of column b  is 25 for partition p0  and 20 for partition p1 , and the limiting value of column c  is 100 for partition p1  and 50 for partition p2 : 

CREATE TABLE rc4 ( a INT, b INT, c INT ) PARTITION BY RANGE COLUMNS(a,b,c) ( PARTITION p0 VALUES LESS THAN (0,25,50), PARTITION p1 VALUES LESS THAN (10,20,100), PARTITION p2 VALUES LESS THAN (10,30,50) PARTITION p3 VALUES LESS THAN (MAXVALUE,MAXVALUE,MAXVALUE)  ); 

When designing tables partitioned by RANGE COLUMNS , you can always test successive partition definitions by comparing the desired tuples using the mysql  client, like this: 

mysql> SELECT (0,25,50) < (10,20,100), (10,20,100) < (10,30,50); 

<img src='content_image/704544.jpg'>

