I have 3 columns of data I'm searching on: description (fulltext), lat (index), and lon (index).
When I do SELECT id FROM table MATCH(description) AGAINST ('query' IN BOOLEAN MODE) everything processes quickly and works fine.
When I do SELECT id FROM table WHERE lat BETWEEN a and b AND lon BETWEEN x and y everything processes quickly and works fine.
When I merge the two where clauses together with a simple AND and do SELECT id FROM table MATCH(description) AGAINST ('query' IN BOOLEAN MODE) AND (lat BETWEEN a and b AND lon BETWEEN x and y) everything works fine, but it takes several seconds to process.
The first two queries will take 0.1 seconds and the last one will take 3+ seconds and I can't seem to figure out how to make it run quicker. The description is full text indexes and the lat/lon columns are normal indexes.
Any ideas on what is slowing things down and/or how to fix it? The table is InnoDB.
EXPLAIN SELECT ...for the slow query.fulltext, see : dev.mysql.com/doc/refman/5.0/en/index-merge-optimization.html