Forum OpenACS Q&A: Re: Tools for finding slow queries?

Collapse
Posted by Carl Coryell-Martin on
hey Janine, I wrote are replacement for ns_db that can be configured to log elapsed time of every query into the error log.

I then have two tcl scripts that will parse the resulting error logs, pull out all the queries and collect statistics about each one.

I recently analyzed 16M lines of log found 635K queries.  My script found 500 unique queries and gave me the mean, max and min execution time and the number to times the query was run.

Ping me if you are interested, and I'll email you the scripts.