MySQL partition functions and restrictions

Source: Internet
Author: User

MySQL partitions are easy to use, but what can be done by MySQL partitions? Are there any restrictions on MySQL partitions? After reading the following, you can find the answer.

What can I do with MySQL partitions?

Logical Data Segmentation

Improve the speed of a single write and read Application

Improve the speed of reading and querying by partition range

Split data can have multiple physical file paths

Efficiently saves historical data

Check constraints on a table

Different master/slave server partition policies, such as master partitioning by Hash and slave partitioning by range
 

MySQL partition restrictions

• Only integer columns in the data table can be partitioned, or data columns can be converted to integer columns through the partition function.

• The maximum number of partitions cannot exceed 1024

• If it contains a unique index or primary key, the partition column must be included in all unique indexes or primary keys.

• Foreign keys are not supported

• Full-text index fulltext is not supported)

Partitioning by date is very suitable because many date functions can be used. However, there are not many suitable partition functions for strings.

Two MySQL partitions

Mysql Stored Procedure FAQs

Example of creating a MySQL Stored Procedure

Use of mysql ifnull Functions

MySQL DATEDIFF () syntax

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.