0% found this document useful (0 votes)
6 views13 pages

Table Partioning

The document discusses table partitioning, outlining its necessity for managing large data tables and improving query performance. It details types of partitioning, including vertical and horizontal, and explains when to use each type. Additionally, it covers aligned and non-aligned indexes in SQL Server, along with relevant operations and features introduced in recent versions.

Uploaded by

www.greeny
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views13 pages

Table Partioning

The document discusses table partitioning, outlining its necessity for managing large data tables and improving query performance. It details types of partitioning, including vertical and horizontal, and explains when to use each type. Additionally, it covers aligned and non-aligned indexes in SQL Server, along with relevant operations and features introduced in recent versions.

Uploaded by

www.greeny
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

TABLE PARTITIONING

K HARSHA
AGENDA

• Understanding different types of partitioning .


• Creating the partitioning
• Spiting the partitioning
• Merging the parting
• Improving the query performance using partitioning.
WHY WE NEED TABLE PARTITIONING

• To effectively manage the Large data table.


• Moving the Unused data to archive table [Purge]
• Truncate the table using where kind of
• To Reduce the maintenance window
TYPES OF PARTITIONING

• Vertical partitioning
• Horizontal portioning.
VERTICAL PARTITIONING

Splitting the single table into multiple


table is called vertical partitioning.

From developers point of view we used to


call Normalization
HORIZONTAL PARTITIONING

partitioning the Large table data into multiple


smaller partitions
WHEN TO USE VERTICAL OR HORIZONTAL PARTITIONING

• To reduce the data inconsistency we use


vertical portioning
• To remove or purge or un used data we use
horizontal partitioning.
RANGE LEFT
RANGE RIGHT
LEFT VS RIGHT
ALIGNED & NON-ALIGNED INDEX

• Aligned index: A non-clustered index created on a partitioned table


using the same partitioning scheme and partition boundaries.
• Non-aligned index: A non-clustered index created on a partitioned table
using a different partitioning scheme or partition boundaries.
• If you don’t specify the filegroup name (ie [PRIMARY]) then by default
SQL will assume you wanted a partitioned NC index and automatically
align it to the same partition function as that of the underlying table.
ALIGNED & NON-ALIGNED INDEX

• From SQL Server 2014 a single partition index operations are supported.
• Example:

ALTER INDEX idx_TransactionID on


Production.TransactionHistoryArchive_SPOIR REBUILD PARTITION = 2
WITH (ONLINE = ON)

• Truncate option was introduced from SQL Server 2016 onwards.


• Partition by is ranking function and no relation with Table partitioning.
THANK YOU

You might also like