How can I optimize/refactor a TSQL “LIKE” clause?

前端 未结 7 747
野的像风
野的像风 2020-12-10 04:50

I have a table with 117000 or so records. I need to perform a search that checks 3 separate fields for a given string pattern.

My where clause is as follows:

7条回答
  •  悲&欢浪女
    2020-12-10 05:45

    Anytime you start a LIKE search with a wildcard, you're doing a scan. Unless you can narrow your search criteria to include the first character (which may not be feasible), you'll need to resort to Full Text Search.

提交回复
热议问题