Does a Unique Constraint Store the Row Identifier at the leaf level of the b-tree

  • Given that a unique constraint essentially creates a unique non-clustered index on the table, does the unique constraint store the row identifiers of the "non-clustered index" at the leaf level of the b-tree (I'm assuming the unique constraint is in a b-tree?). I've read blogs that suggests that the query optimiser treats unique constraints and unique indexes the same, which suggests to me that the underlying structures should be the same, but is this the case?

  • UNIQUE CONSTRAINTs and UNIQUE INDEXes are implemented the same behind the scenes in SQL Server. 
    The nodes of those non-clustered constraints/indexes contain row locators to the clustered index / table data rows.  

    -Eric Isaacs

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

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