Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Table partitioning

Author  Topic 

kumarich1
Yak Posting Veteran

99 Posts

Posted - 2010-01-15 : 15:57:34

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

5072 Posts

Posted - 2010-01-15 : 17:02:37
did u use partition function?
Go to Top of Page

kumarich1
Yak Posting Veteran

99 Posts

Posted - 2010-01-16 : 09:02:22
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

5072 Posts

Posted - 2010-01-17 : 10:24:05
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
   

- Advertisement -