Query Performance with NULL

前端 未结 8 1997
失恋的感觉
失恋的感觉 2021-01-14 14:29

I would like to know about how NULL values affect query performance in SQL Server 2005.

I have a table similar to this (simplified):

ID | ImportantDa         


        
8条回答
  •  一向
    一向 (楼主)
    2021-01-14 14:51

    NULL looks fine to me for this purpose. Performance is likely to be basically the same as with a non-null column and constant value, or maybe even better for filtering out all NULLs.

提交回复
热议问题