Strategies for checking ISNULL on varbinary fields?

后端 未结 2 1176
孤街浪徒
孤街浪徒 2020-12-16 12:15

In the past I\'ve noted terrible performance when querying a varbinary(max) column. Understandable, but it also seems to happen when checking if it\'s null or not, and I was

2条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-16 13:09

    We had a similar problem when looking for rows where a varbinary value was not null. For us the solution was to update the statistics for the database:

    exec sp_updatestats
    

    After doing this the queries ran much faster.

提交回复
热议问题