Pada Tue, 27 Aug 2002 12:34:32 +0200
"David BORDAS" <[EMAIL PROTECTED]> menulis :
> Hi all,
>
> I've discovered that we have a select query that blocked all others query to
> this table.
>
> 99% of query used indexs, no join ...
> But this one is a problem :
> SELECT Field1,Field2,Field3,Field4,Field5,Field6,Field7 FROM MyTable WHERE
> Field7=15 AND Field2=0 AND (Field3 LIKE '%John%' OR Field4 LIKE '%John%' OR
> Field5 LIKE '%John') ORDER BY Field6 LIMIT 0,20;
>
> I know that '(Field3 LIKE '%John%' OR Field4 LIKE '%John%' OR Field5 LIKE
> '%John')' part is the problem.
have you try to remove the ORDER BY Field6 ? and compare the query time ?
--
All language designers are arrogant. Goes with the territory...
-- Larry Wall
MySQL 3.23.51 : up 67 days, Queries : 358.251 per second (avg).
--
Dicky Wahyu Purnomo - System Administrator
PT FIRSTWAP : Jl Kapt. Tendean No. 34 - Jakarta Selatan 12790
Phone : +62 21 79199577 - HP : +62 8551044244 - Web : http://www.1rstwap.com
---------------------------------------------------------------------
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