I'm using pretty standard approach to sorting search results by relevancy:
SELECT DISTINCT product_name,
MATCH (keywords) AGAINST ('CONSOLIDATED* 16* bearing*' IN BOOLEAN MODE) AS
rate
FROM _TT
WHERE MATCH ( keywords ) AGAINST ('CONSOLIDATED* 16* bearing*' IN BOOLEAN
MODE ) >0
ORDER BY rate DES
The problem is that there are certain conditions after WHERE different for
each query and the results number can be very different.
--
View this message in context:
http://www.nabble.com/Applying-LIMIT-to-SELECT-count%28*%29-tp14453544p14459808.html
Sent from the MySQL - General mailing list arc
Hi,
My task is to limit calculation of total number of items in the database
that satisfy certain conditions. I join two tables using WHERE and there are
millions of records as the result. When I do SELECT count(*) it takes
really too long. The table has appropriate indexes and I experimente