Clustered Index and nullable column!!!!!

  • I have a column 'A' with Data type (Uniqueidentifier, null) on the same column 'A' there is a clustered Index. My question is, Does a clustered index allow 'null'? if it does, is it a good practice? The table is Huge 500+GB, should I add Identity column and make it primary key/clustered index? There is no PK on the table by the way.

    Thanks smart people

  • Clustered index column can be nullable. It's the primary key which does not allow any nulls.

    Uniqueidentifier however is generally a bad choice for clustered index because of the randomness. But to be honest it's hard to say much without seeing table and queries and having some knowledge of how it's used.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 2 posts - 1 through 1 (of 1 total)

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