From: "Andrew Izsof" <[EMAIL PROTECTED]> DB > I know that '(Field3 LIKE '%John%' OR Field4 LIKE '%John%' OR Field5 LIKE DB > '%John')' part is the problem.
AI> The formula : '%John%' always sweeps through all of the records, because it AI> can't utilize any indexes, sorting, etc. But if you leave the wildcard % AI> from the beginning, then the optimizer quickly sorts out the relevant AI> records. Of course this reduces the effectiveness of the search pattern, but AI> makes the query ultra-fast. Hmm don't be enough for me :(.> AI> Another way to speed up the whole thing (I recommend this one, because of AI> the big text areas) is using fulltext indexes. The only drawback with AI> fulltext, that it can only search for full words. I'll try to have a look to this ... Thanks David --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php