Mysql query like fuzzy speed optimization

LOCATE ( 'substr', str, pos) method

The LOCATE the SELECT ( ' XBAR ' , `foobar`); 
### returns 0 

the SELECT the LOCATE ( ' bar ' ,` foobarbar`); 
### returns. 4 

the SELECT the LOCATE ( ' bar ' , `foobarbar`, . 5 ); 
## # 7 return
SELECT `column` FROM `table` WHERE LOCATE('keyword', `field`)>0


源文:https://www.cnblogs.com/mqxs/p/9703000.html

Guess you like

Origin www.cnblogs.com/shy1766IT/p/12043975.html
Recommended