SQL Table Partitioning

Source: Internet
Author: User

Table partitioning, which improves query efficiency for large data scale. The knowledge points involved in partitioning are:

One, create filegroups and files;

Second, create the partition function;

Third, create a partition scheme;

Four, partitioning the table;

Five, merge partition table.

One, create filegroups and files. Visual interface created like, code created here does not speak.

Second, create partition function, partition scheme. Create a partition by clicking Storage, table. For example, there are three districts, Gen Y, 2000, and the following are the people who were born:

Next, until the completion, the script is automatically generated, after execution, the table partition has been completed.

Third, merge the partition table. For example, merging 80, you need only 2 partitions.

Before merging, Gen Y had 20,000 data, leaving 80,000, merging, only one partition, and 100,000 data.

Alter PARTITION function Pf_born () Merge range (' 1990/01/01 ').

SELECT *
FROM dbo. T_user
WHERE $PARTITION. Pf_born (born) = 1

SQL Table Partitioning

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.