Using LIKE vs. = for exact string match

后端 未结 2 1309
轮回少年
轮回少年 2020-12-14 15:15

First off, I recognize the differences between the two:
- Like makes available the wildcards % and _
- significant trailing whitespace
- colation issues

2条回答
  •  醉话见心
    2020-12-14 15:53

    I would say that the = comparator would be faster. The lexical doesn't send the comparison to another lexical system to do general matches. Instead the engine is able to just match or move on. Our db at work has millions of rows and an = is always faster.

提交回复
热议问题