Table partition

  • Good day

    Could someone please assist with this question, I'm doing a table partitioning on my dev environment and I've noticed that MS SQL2012 drops the clustered index on the table & recreates it & again drops it, I understand the first process which is dropping & recreating, but, I do not get the last dropping process, could someone please explain?

    ALTER TABLE [HumanResources].[Employee] DROP CONSTRAINT [PK_Employee_BusinessEntityID]

    ALTER TABLE [HumanResources].[Employee] ADD CONSTRAINT [PK_Employee_BusinessEntityID] PRIMARY KEY NONCLUSTERED

    (

    [BusinessEntityID] ASC

    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

    CREATE CLUSTERED INDEX [ClusteredIndex_on_Test_scheme_635530598806367527] ON [HumanResources].[Employee]

    (

    [HireDate]

    )WITH (SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [Test_scheme]([HireDate])

    DROP INDEX [ClusteredIndex_on_Test_scheme_635530598806367527] ON [HumanResources].[Employee]

Viewing 0 posts

You must be logged in to reply to this topic. Login to reply