On Fri, 16 Aug 2002, Brian Moon wrote: > I ran into a problem when the queries started to call for 500,000+ rows. > The query would not return. Here is the query and explain: > > select SQL_NO_CACHE id from single_table where approved='Y' AND datestamp >= > '2001-08-16 00:00:00' AND ( ( author LIKE '%myphorum%' OR subject LIKE > '%myphorum%' OR body LIKE '%myphorum%' ) ) order by datestamp desc;
Brian, this query, having a joker at the beginning of each search string, scans through the whole table. It can't possibly be fast on large tables. Regards, Thomas --------------------------------------------------------------------- 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