Please come in. several questions: 1. how does PHP determine whether mysql supports partitioning? 2. partition by field range? we all know that the program is SQLcodePARTITIONBYRANGE (check_id) (PARTITIONp0VALUESLESSTHAN (1) and PARTITIONp1VALUESLESST.
1. how does PHP determine whether mysql supports partitioning?
2. partition by field range. we all know that the program is:
SQL code
PARTITION BY RANGE (check_id) (PARTITION p0 VALUES LESS THAN (1),PARTITION p1 VALUES LESS THAN (2),PARTITION p2 VALUES LESS THAN MAXVALUE);
But I don't want to divide by range, because my field is a constant. I want to divide by direct equality (you can understand). What do I mean by the following?
SQL code
PARTITION BY RANGE (check_id) (PARTITION p0 VALUES=(1),PARTITION p1 VALUES=(2),PARTITION p2 VALUES=MAXVALUE);
In addition, if the check_id field is A string (such as A fixed value A, B, C), is it OK?
3. how to specify a partition query for a partitioned table. (Because I know that the data to be queried is in a partition)
For example, if I divide the check_id = "1" data to part_01, and check_id = "2" to part_02, then:
SELECT * FROM text WHERE word = "abc" AND check_id = "1 ";
Can it be written directly as follows:
SELECT * FROM text PARTITION (part_01) WHERE word = "abc"; // here check_id = "1" No, right?
Please give me more details!
------ Solution --------------------
Mysql data partition. Baidu.
------ Solution --------------------
Baidu
------ Solution --------------------
1. how does PHP determine whether mysql supports partitioning?
Show variables like '% partition % ';
If have_partition_engine is not found in the query results or the value column is No, it indicates No
------ Solution --------------------
Mysql supports five partitioning methods.
RANGE partitioning
LIST partition
HASH partition
KEY partition
Subpartition
I don't quite understand which method you described. please analyze it yourself.
------ Solution --------------------
Http://dev.mysql.com/doc/refman/5.1/zh/partitioning.html
This document describes partitions. Different partitions are different.