MySQL Forums
Forum List  »  General

Re: Fastest way to find if any rows match
Posted by: Bill Karwin
Date: May 18, 2006 11:13AM

What does EXPLAIN tell you about the optimization plan? If `current` is indexed, it should use the index and be pretty quick. Unless your LIKE pattern begins with a wildcard.

LIMIT 1 should have given some improvement.
See http://dev.mysql.com/doc/refman/5.0/en/limit-optimization.html

What is your key_buffer_size set to? Is it able to hold the index for `current`? Can you increase the key_buffer_size and preload that index?

Regards,
Bill K.



Edited 1 time(s). Last edit at 05/18/2006 11:14AM by Bill Karwin.

Options: ReplyQuote


Subject
Written By
Posted
Re: Fastest way to find if any rows match
May 18, 2006 11:13AM


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.