By default, a SQLServer table clustered index is the PK. If I define that:
- such key is a GUID and
- I will generate at random a.k.a
Guid.NewGuid()
and - forget to set the clustered index to a more meaningful column
will SQLServer reorder the pages as a new record enters the table or will it just "ignore" the clustered part of the index?
I think you got it reversed: by default, the PK is also the clustered index. You must choose the data type and what columns to include in the PK. SQL Server won't set a default PK for you. Without a PK, a table is a heap.
Using GUID as a PK is bad practice. You will cause unnecessary page splits upon
INSERT
. If the data does not have a natural key, use anIDENTITY
column instead.