Upload
joella-blankenship
View
217
Download
0
Embed Size (px)
Citation preview
Dual Partitioning for improved performance in VLDBs
Ashwin Rao Karavadi, Rakesh ParidaMicrosoft IT
Data PartitioningWhy?
• Split a table into manageable partitions
• Improve data access performance
• Simplify maintenance
Partitioned Views
• Available since SQL Server 7.0• A partitioned view is a view defined by a UNION ALL of member tables structured in the same
way, but stored separately as multiple tables in either the same instance of SQL Server or in a
group of autonomous instances of SQL Server servers
• Query optimizer utilizes constraints to perform
partition elimination• Partition elimination occurs for SELECT and for DML statements
• Only one column can be used for partitioning• With only one constraint on the partitioning column
Partitioned Tables
• Available SQL Server 2005 onwards• Data is partitioned horizontally so that groups of rows are mapped into
individual partitions, based on a specified column. The partitions can be put
on one or more filegroups in the database. The table or index is treated as a
single logical entity when queries or updates are performed on the data
• Static and dynamic partition elimination
• Only one partition column can be used for
partitioning
Dual partitioning using partitioned views and partitioned tables
• Partition data using partitioned views over
partitioned tables
• Why dual partitioning:
– Support for scenarios where there is a need to
partition on two columns
– Optimized access when filtering on both columns
– Can spread data across multiple DBs/servers
Dual partitioning – application specific scenario
• Very large table with data related to FiscalYear and
FiscalMonth
• Need to archive data into a different database based on
FiscalYear
• Optimized data access for queries based on FiscalYear and
FiscalMonth
• Simplified data loading from source and data extraction to
archive
Dual partitioning – sample execution plans
Dual partitioning – sample execution plans
Partition-aligned indexed views
• Available SQL Server 2008 onwards
• Can create indexed views over the data in
partitioned tables to improve query performance– In order for a view to be indexed and automatically maintained during partition
switching, the base table and the view must share equivalent partitioning schemes.
That means that if the base table and the view use different partition schemes, the
two partition schemes must be based on the same, or equivalent, partition functions
• Can be (judiciously) used to improve performance
Partition-aligned indexed views – sample execution plans
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market
conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.
MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.