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

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

学习是最好的投资!

répondre à tous(0)
Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!