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.
| Author |
Topic |
|
sunsanvin
Master Smack Fu Yak Hacker
1274 Posts |
Posted - 2008-11-13 : 04:44:28
|
| Dear All,is it possible to create table partitioning on an existing table? or only possible on a new table?what are the main advantages of table partitioning in sql server?thanks in advanceArnavEven you learn 1%, Learn it with 100% confidence. |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
|
|
cvraghu
Posting Yak Master
187 Posts |
Posted - 2008-11-13 : 05:23:10
|
| From BOL - You can turn an existing nonpartitioned table into a partitioned table in one of two ways. One way is to create a partitioned clustered index on the table by using the CREATE INDEX statement. This action is similar to creating a clustered index on any table, because SQL Server essentially drops the table and re-creates it in a clustered index format. If the table already has a partitioned clustered index applied to it, you can drop the index and rebuilding it on a partition scheme by using CREATE INDEX with the DROP EXISTING = ON clause. Another way is to use the Transact-SQL ALTER TABLE SWITCH statement to switch the data of the table to a range-partitioned table that has only one partition. This partitioned table must already exist before the conversion occurs, and its single partition must be empty. For more information about switching partitions, see Transferring Data Efficiently by Using Partition Switching. After the table is modified as a partitioned table, you can modify its partition function to add partitions, as described previously in Modifying a Partition Function. Advantages -- Faster and Easier Data Loading- Faster and Easier Data Deletion or Archival- Faster Queries |
 |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-11-13 : 10:34:15
|
| You need to have Clustered index in place for existing tables to participate. |
 |
|
|
|
|
|