If I have a clustered single column index, e.g FooId in SQL Server 2008, 2012 and I know I have messed up the order of the rows to not have sequential order of the FooId column anymore, which command/s should be used:
- Update statistics
- Rebuild
- Reorganize
EDIT
Scenario
FooId is a clustered pk of type sequential uniqueidentifier, but for keeping it simple it this post we use #1 as id values.
#1 inserted
#2 inserted
#3 inserted
#1 selected
#1 deleted
#2 selected
#2 deleted
#2 inserted (that is reusing the clustered PK of #1)
#1 inserted (that is reusing the clustered PK of #1)
Isn't this going to break the sequential order? Will it not be stored like this now:
#3
#2
#1
//Daniel