【发布时间】:2010-11-08 15:18:27
【问题描述】:
我在“搜索”列上有一个全文索引。但查询包含额外的“AND”条件,其中涉及 tinyint 列“VEGETARIAN”。
这种情况的最佳解决方案是什么?保持原样 - 仅在“搜索”列上的全文索引?要在“VEGETARIAN”列上再创建一个索引?
$result = mysql_query( "SELECT title FROM recipes where
match(search) against('$query' in boolean mode) and vegetarian='1'
limit $start, $step");
谢谢。
【问题讨论】:
标签: mysql indexing full-text-search