Performance of like '%Query%' vs full text search CONTAINS query

前端 未结 3 2013
孤独总比滥情好
孤独总比滥情好 2020-12-01 02:41

I have a situation where I would like to search a single word.

For that scenario, which query would be good from a performance point of view?

3条回答
  •  难免孤独
    2020-12-01 03:21

    For a typical database, the CONTAINS search can be much faster assuming the appropriate full text search index is built on the field being searched. The evaluation of the LIKE operator generally doesn't use an index and thus must read all the data.

提交回复
热议问题