SQL Server Performance Forum – Threads Archive
NULLS in clustered indexOur users typically hit a large table by a datetime column – close_ts. We would like to make this column the clustered index. However, since this is a close timestamp column, this datetime column will by NULL until an order is closed – then will have an actual value. I understand the negative impact to our load performance given that this clustered index will have updates. Are there any other concerns from the query side with having a clustered index with NULLs (approx 4-5% of the table)?
Perhaps there is an alternative for the date field, like a status field that is never null? If you have a reference table for the status field and proper indexing, you’ll be searching with much less variation in the data you’re searching on – perhaps 10 distinct values instead of thousands of different dates.
Multiple NULL values are considered duplicates when UNIQUE index is created.
Why not define a constant value for this date field until the latest timestamp value is updated. Satya SKJ
This posting is provided â€œAS ISâ€ with no rights for the sake of knowledge sharing.