On Mon, Mar 31, 2003 at 09:40:24AM -0600, Michael Muratet wrote:
> On Mon, 31 Mar 2003 10:07:55 +0100
> Tim Bunce <[EMAIL PROTECTED]> wrote:
> > > The same query from the command line takes 0.02 seconds. A factor of
> > > 5,000 tells me I've made a stupid blunder somewhere, but I've read
> > > and reread the documentation and it all looks OK to me.
> > >
> > 
> > During the 93 seconds the execute takes, start the mysql client in
> > another window and do a "show processlist" (or show full processlist)
> > and try to identify your client connection and what status it is in.
> > 
> > Tim.
> 
> I started the perl script that implements the query, and then checked
> the state of the process. It spends the entire time in the state
> "Sending data". Since this is the server side, it's a little unclear to
> me who's sending what to whom.

Sending to the client. But the server thread actually enters that
state as soon as it's started executing the query (as all locks etc)
but before it's sent any results back to the client.

> Any thoughts on where to search for a problem would be appreciated.

If you're on a unix box then using truss (or strace etc) would show you
when data starts returning from the server.

If you change the query to something trivial ("select 1") is it fast?
If so, keep changing the query to isolate what makes it slower.

Tim.

Reply via email to