5 messages in com.mysql.lists.win32Re: Re : 3000 rows, 33 seconds, then ...
FromSent OnAttachments
Greg Quinn09 Dec 2004 10:42 
John Paul Ashenfelter09 Dec 2004 10:49 
Juan Pedro Reyes Molina09 Dec 2004 11:05 
Greg Quinn09 Dec 2004 11:18 
Juan Pedro Reyes Molina09 Dec 2004 11:37 
Subject:Re: Re : 3000 rows, 33 seconds, then 67 seconds
From:Juan Pedro Reyes Molina (juan@gobiernodecanarias.org)
Date:12/09/2004 11:37:24 AM
List:com.mysql.lists.win32

MySql manual says:

========================

5.7.2.10 Table Optimization <cid:part@terra.es>

<cid:part@terra.es>

To coalesce fragmented records and eliminate wasted space resulting from deleting or updating records, run @command{myisamchk} in recovery mode:

shell> myisamchk -r tbl_name

=============================

I don't know if you are using myisam or innodb tables. Search for "fragment" in MySql Manual.

Of course, if disk space is fragmented too you will need to get rid of that too.

Greg Quinn escribió:

Its definately not a network prob, cached queries of 3000 rows are returned
almost immediately. Its just the initial read that is very slow.

How do you mean physical space? You mean if hard drive space is fragmented?

A direct table scan can take longer than an index scan if phisical space is too fragmented.

Can you test your query in the box where mysql lives? Just to be sure is not a net problem. A faulty net adapter can be losing information,