[ic] slow mysql search

Dan B interchange-users@lists.akopia.com
Mon Jun 4 18:20:01 2001


At 10:29 AM 6/3/2001 -0700, you wrote:

>I am using mysql and the database has 60,000 rows.
>Search on an indexed text field usually takes less
>than 3 seconds.
>But, occastionally, it takes over 25 seconds.
>
>I do not see memory swap on
>my machine when this slow search occurs.
>
>Does anyone know what could possibly cause this
>occasional slow search?
>
>thanks in advance,
>steve

This is better answered on one of Mysql's great lists.  If you were so 
inclined to post your schema, someone might be inclined to answer (probably 
not me, sorry).

Otherwise, it could be a million reasons:  the indexed row is a variable 
length longer than the bytes in an index.  Therefore a query that goes past 
that byte length without finding the exact matching index will have to 
examine every record instead of just finding the index.  (i.e. WHERE lname 
= "Supercalafragalistic" on a table where the index is only "......." bytes 
long).

HTH,

Dan Browning, Cyclone Computer Systems, danb@cyclonecomputers.com