Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Relation between Table Partition and Cluster Index


Relation between Table Partition and Cluster Index

Author
Message
Ramdas Baghel
Ramdas Baghel
SSC Veteran
SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)

Group: General Forum Members
Points: 286 Visits: 964
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
hi_abhay78
hi_abhay78
Old Hand
Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)Old Hand (317 reputation)

Group: General Forum Members
Points: 317 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)
J.Yogesh
J.Yogesh
Forum Newbie
Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)

Group: General Forum Members
Points: 8 Visits: 53
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search