相关疑难解决方法(0)

Optimization of MySQL search using "like" and wildcards

How can queries like

SELECT * FROM sometable WHERE somefield LIKE '%value%'
Run Code Online (Sandbox Code Playgroud)

be optimized?

The main issue here is the first wildcard which prevents DBMS from using index.

Edit: What is more, somefield value is solid string (not a piece of text) so fulltext search could not be performed.

mysql optimization wildcard

15
推荐指数
3
解决办法
1万
查看次数

标签 统计

mysql ×1

optimization ×1

wildcard ×1