How to determine whether to support partition _mysql in Mysql

Source: Internet
Author: User

MySQL can use the following statement to determine whether the partition is supported:

Show VARIABLES like '%partition% ';

If the output:

Have_partitioning YES

Represents a support partition.

or through:

Show PLUGINS;

Displays all Plug-ins, if any, partition ACTIVE STORAGE ENGINE GPL plugin indicates support partition

PS: What is a database partition

Some time ago wrote an article on the MySQL table, the following to say what is a database partition, MySQL as an example. The data in the MySQL database is documented as the situation exists on the disk, by default placed in the/mysql/ Data below (can be viewed through the datadir in my.cnf), a table mainly corresponds to three files, one is the FRM table structure, one is the MyD table data, one is the Myi table index. If the amount of data in a table is too large, then the myd,myi will become very large, find the data will be very slow, this time we can take advantage of the MySQL partition function, in physics, this table corresponding to the three files, split into many small pieces, so that we look up a data, we do not have to search all the , just know where this piece of data is, and then find it together. If the table's data is too large for a disk to fit in, we can assign the data to a different disk.

Two ways to Partition

1, horizontal zoning

What is a horizontal partition? is horizontal to partition, for example, Ming, if there are 100W data, divided into 10, the first 10W data to be placed in the primary partition, the second 10W data to the second partition, and so on. That is to divide the table into the very, the root uses the merge to divide the table, a bit like oh. When you take out a piece of data, the data contains all the fields in the table structure, that is, the horizontal partitions, without altering the structure of the table.

2, longitudinal zoning

What is a vertical partition? Is the vertical zoning, for example, in the design of user tables, the beginning of the time did not consider good, and put all the information of the individual into a table, so that the table will have a larger field, such as personal profile, and these profiles, may not have a lot of people to see, so wait until someone to see the time, In the search, the table, you can put such a large segment, separated.

Related Article

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.