Does Partitioned Table require Clustered Index?

Ardan Zaki 236 Reputation points
2022-12-08T08:40:36.197+00:00

Hi, I'm currently creating a partition table by creating new table on partition schema and then copy data from existing table to the new partitioned table, I'm using date column as partition key column.

does partitioned table require clustered index? fyi, the table doesn't have primary key

and if it require the clustered index, should I use the partition key column (date) in that clustered index?

or should I just create nonclustered non-unique index on my partition key column?

Developer technologies | Transact-SQL
SQL Server | Other
0 comments No comments
{count} votes

Accepted answer
  1. Dan Guzman 9,401 Reputation points
    2022-12-08T13:31:27.443+00:00

    Table partitioning does not require a clustered index but I suggest one create a clustered index on SQL Server tables unless there is a specific reason to organize the table as a heap.

    The clustered index does not need to be a primary key nor does it need to be unique. SQL Server will implicitly add the partitioning column as a clustered index key for non-unique clustered indexes if it's not already an explicit key column.

    A non-unique clustered on your date column will be especially appropriate If data are incrementally inserted into the table by date and queries specify date ranges in WHERE clauses without additional criteria. Additional non-clustered indexes may be needed to optimize queries for other criteria.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.