MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Thomas Spahni Date:August 16 2002 3:51pm
Subject:Re: Query slowing down, need advice
View as plain text  
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

Thread
Query slowing down, need adviceBrian Moon16 Aug
  • Re: Query slowing down, need adviceThomas Spahni16 Aug
    • Re: Query slowing down, need adviceBrian Moon16 Aug
      • Re: Query slowing down, need adviceTod Harter16 Aug
Re: Query slowing down, need adviceBrian Moon17 Aug