Please come in, a few small questions

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.