Particionamiento de Tablas e Indices en SQL Server
Particionamiento de Tablas e Indices en SQL Server
Particionamiento de Tablas e Indices en SQL Server
Portal GuilleSQL
http://www.GuilleSQL.es
Agenda
About Us
OnLine and spanish User Group (Spain and Latam) Microsoft IT focused: SQL Server, SharePoint, Virtualization, etc. Articles, News, Videos/WebCasts 225+ registered members
Faster data loading and archiving, using partitioned tables. Properly filtered queries will access only the correct partitions. You can enable partition lock scalation on a per table basis. You can mark partitioned tables filegroups as read-only. You can compress individual partitions. You can rebuild only one index partition.
Table: tblDatos
Partion
Table: tblDatosHistoricos
Partition
tblDatos tblDatosHistorios
GUID
GUID
Agosto 2009
Julio 2009
20090801
20090701
1
1
tblDatos tblDatosHistorios
GUID
GUID GUID
Septiembre 2009
Agosto 2009 Julio 2009
20090901
20090801 20090701
1
1 1
Demo
Conclusion
Check the requirements to using ALTER TABLE SWITCH PARTITION SWITCH requires source and target partitions existing on the same FileGroup (metadata operation) SPLIT empty partition for best performance (avoid scan partitions and data movement) MERGE empty partitions for best performance (avoid scan partitions and data movement) SWITCH is immediate, it is simply a metadata operation (like SPLIT and MERGE on empty partitions) SWITCH, SPLIT, MERGE: schema modification lock Up to 1000 partitions per table (Note: SQL Server 2008 SP2 enable up to 15000 partitions per table)
Portal GuilleSQL
http://www.guillesql.es
Cmo cargar Tablas Particionadas con SELECT INTO en SQL Server: ALTER TABLE SWITCH PARTITION
http://www.guillesql.es/Articulos/SELECT_INTO_INSERT_INTO_Particionamiento_ALTER_TABL E_SWITCH_PARTITION.aspx
White Paper: Partitioned Table and Index Strategies Using SQL Server 2008
http://msdn.microsoft.com/en-us/library/dd578580.aspx