mysql像性能提升

编程入门 行业动态 更新时间:2024-10-21 06:33:03
本文介绍了mysql像性能提升的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

如果涉及通配符,是否仍可以像操作员一样加快mysql的运行速度?例如.就像%test%"

is there anyway to speed up mysql like operator performance if wild card is involved? eg. like '%test%'

推荐答案

如果查询看起来像foo LIKE 'abc%'或foo LIKE 'abc%def%',MySQL可以使用索引.它可以将索引用于第一个通配符之前的任何部分或字符串.如果需要在字符串中的任意位置匹配单词,则可能需要考虑使用FULLTEXT索引.

MySQL can use an index if your query looks like foo LIKE 'abc%' or foo LIKE 'abc%def%'. It can use the index for any portion or the string before the first wildcard. If you need to match a word anywhere within a string, you might want to consider using FULLTEXT indexes instead.

有关索引的更多详细信息: dev.mysql /doc/refman/5.1/en/mysql-indexes.html

More detail on indexes: dev.mysql/doc/refman/5.1/en/mysql-indexes.html

全文搜索: dev.mysql. com/doc/refman/5.0/en/fulltext-search.html

更多推荐

mysql像性能提升

本文发布于:2023-10-29 03:46:56,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1538632.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:性能   mysql

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!