Reputation: 1498
Sometimes a PostgreSQ database I support is overloaded. I need to pinpoint the exact queries that cause the database to be overloaded. I have created a pgFounie output on the relevant time frame: http://bit.ly/f2aikx
In that report there is a row
Query peak: 4 queries/s at 2011-03-15 10:41:06, 2011-03-15 10:44:18, 2011-03-15 10:48:25
It is not clear whether the mentioned timestamps are for the start or end of the peak.
Upvotes: 2
Views: 803
Reputation:
I'm not sure what the question is, but I'll take a stab at a few things:
The "Query peak" metric is referring to three separate seconds where you saw a peak throughput of 4 queries per second.
Here's how I would approach pinpointing your problematic queries:
EXPLAIN ANALYZE
on them to get actual execution plans. In the long run, I would change settings in pgFouine to only log queries that execute for over 100ms. You can do that using the log_min_duration_statement
setting in the postgresql.conf file.
Upvotes: 1