性能优化 - 这条MySQL的全文索引查询语句有什么问题
PHPz
PHPz 2017-04-17 11:01:22
0
0
307

select id,createDate from ofnews where match(newsrange) against ('+1000005' in boolean mode) and state != '0' and publisher ='someuser'

数据有5万条,newsrange是fulltext全文索引,publisher是普通的varchar字段

上面的SQL语句执行了0.9秒

而如果去掉 and publisher = 'someuser',只有0.02秒

请问如何优化?

PHPz
PHPz

学习是最好的投资!

reply all(0)
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!