MySQL Forums
Forum List  »  Full-Text Search

COUNT in fulltext too slow
Posted by: Radek Janus
Date: March 25, 2006 07:15AM

Hi, I have problem with count in to fulltext:

My query:

SELECT count( keywords_0.fotografie_id ) AS pocet
FROM keywords_0
LEFT OUTER JOIN filtry
USING ( fotografie_id )
WHERE filtry.fotografie_id IS NOT NULL
AND
MATCH keywords
AGAINST (
'"adult"'
IN BOOLEAN
MODE
)
AND filtry.denied =0


This query run about 8-10 sec.
Table "keywords_0" have 100 000 rows, table "filtry" 500 000 rows.
Best speed is when I use LEFT OUTER JOIN, but it run 8 sec. It's too slow.



EXPLAIN:

id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE keywords_0 fulltext fotografie_id,keywords keywords 0 1 Using where
1 SIMPLE filtry ref fotografie_id fotografie_id 4 _sundayphotobeta_com.keywords_0.fotografie_id 1 Using where


How can I speed up this query? Thanks for reply.

Options: ReplyQuote


Subject
Views
Written By
Posted
COUNT in fulltext too slow
3388
March 25, 2006 07:15AM
2260
March 25, 2006 07:28AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.