sql

LIKE查询与索引的不解之谜

like %keyword 索引失效,使用全表扫描。但可以通过翻转函数+like前模糊查询+建立翻转函数索引=走翻转函数索引,不走全表扫描。like keyword% 索引有效。like %keyword% 索引失效,也无法使用反向索引。===============================================================

elasticsearch-sql使用

安装 ./bin/plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/2.3.2.0/elasticsearch-sql-2.3.2.0.zip docker docker run -it -p 9200:9200 -p 9300:9300 elasticsearch