SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Table partitioning
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kumarich1
Yak Posting Veteran

99 Posts

Posted - 01/15/2010 :  15:57:34  Show Profile  Reply with Quote

I have created a new partitioned table and imported 30 million rows into this partitioned table. By using below script I confirmed that all data is partitioned same as I created the partition function.

SELECT *
FROM sys.partitions
WHERE OBJECT_ID = OBJECT_ID('Table_Archive')

So far table partitioning looked like it is working. When I created table I did not added Index just to do the data inserts faster.
So later when I added clustered Index on this table I noticed this. I ran the same above script what I noticed is 30 million rows are under one Index_id and one partition_id. Which I was not expecting to see.

Please advise what mistake I made.


russell
Pyro-ma-ni-yak

USA
5072 Posts

Posted - 01/15/2010 :  17:02:37  Show Profile  Visit russell's Homepage  Reply with Quote
did u use partition function?

Edited by - russell on 01/15/2010 17:03:53
Go to Top of Page

kumarich1
Yak Posting Veteran

99 Posts

Posted - 01/16/2010 :  09:02:22  Show Profile  Reply with Quote
Yes first created function with range, then scheme then created new table on the scheme. After loading data I added index on table Immediately after adding index I noticed table is not partitioned.
Go to Top of Page

russell
Pyro-ma-ni-yak

USA
5072 Posts

Posted - 01/17/2010 :  10:24:05  Show Profile  Visit russell's Homepage  Reply with Quote
did you use the partition function when you created clustered index?

can we see the partition function and the code to create index?
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000