When does the slow query log place an entry for the slow query? Based
on what is in the log, I would guess that the log is written to after
the query finishes. So, if the log has some entries like:
select .... took 130 seconds
update .... took 60 seconds
insert .... took 513 seconds
It would be reasonable to assume that the insert was the statement
that started the problem. Perhaps it would be usefull to write a
quick script to reorder the slow query log, sorting statements
according to when the startd execution, rather than when they
finished. It might be easier to make sense of it all that way
Let me know if I am way off base here.
Jason
Ian Gilfillan wrote:
- it's not the volume of queries, it's often
the query that starts the
backing up. So look at the first query in the log, and the first queries
after a period of time running OK. Two that I saw this way are:
--
"Jason C. Richey" <jasonr(a)bomis.com>