Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Relation between Table Partition and Cluster Index Expand / Collapse
Author
Message
Posted Wednesday, July 1, 2009 3:46 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Today @ 6:24 AM
Points: 237, Visits: 897
Hi!
I have a table SO_Orders and need to reduce Read I/O from this table. So I have decide table partitioning on multiple disks (Multiple file groups).

My question is that what will happen when I create cluster index on my partitioned table. How Leaf level pages will be arrange on disk. Or may I create partition on clustered index?

What is the best way table partitioning or index partitioning or both?

Ramdas Singh
MCDBA


Ram
MSSQL DBA
Post #745206
Posted Thursday, July 2, 2009 1:34 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, June 13, 2014 12:27 PM
Points: 267, Visits: 386
for short ,when you create a table you need to select the partition scheme and file groups.In partiton scheme you will mention partition function .

Now the clustered index has the data as well so it will automatically be partitioned as per the partitons you mentioned for the table.

for non-clustered index you can again mention the filegroup and the partiton scheme .

this way you will reduce the IOs as the complete data will not be accessed but only the partition where that data you are requesting resides.

Regards


Abhay Chaudhary
Sr.DBA (MCITP/MCTS :SQL Server 2005/2008 ,OCP 9i)
Post #746034
Posted Thursday, January 5, 2012 6:42 AM


Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, February 10, 2014 7:31 AM
Points: 6, Visits: 49
Hi Abhay,

as you said we need to mentioned the partition schema while declaring the table as shown below :-

CREATE TABLE [dbo].[fact_warehouse_transaction]( [transaction_ident] [int] NOT NULL IDENTITY(1, 1), [natural_key] [decimal](18, 0) NULL, [dimension1_ident] [int] NULL, [dimension2_ident] [int] NULL, --… (many other columns) [transaction_date_and_time] [datetime] NOT NULL ) ON [Transaction_Warehouse_Partition_Scheme] (transaction_date_and_time)


BUT, my problem is that , I already have this table (Suppose 'fact_warehouse_transaction' )in DB with primary key over column 'transaction_date_and_time' ,with millions of records.

So i can't run create script instead i need to create Alter Table sort of script.
Can you please suggest the syntax of alter to add this schema 'Transaction_Warehouse_Partition_Scheme' in it.

OR is it so , that when i Re-create Clustered index of this table by binding it to the PARTITIONED SCHEMA , table will automatically be divided in to the different partition ?

ex :-
CREATE Clustered INDEX ix_transaction_warehouse_partitioned
ON [dbo].[fact_warehouse_transaction] (transaction_date_and_time)
ON Transaction_Warehouse_Partition_Scheme (transaction_date_and_time)


IN short is 'partitioning Clustered index' and pratition table the same thing ?

Please clearify.
Post #1230706
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse