Profile what the production server is doing - Mailing list pgsql-performance

From Thomas Güttler
Subject Profile what the production server is doing
Date
Msg-id 6ffd0115-38b7-8a98-b0c9-93fdd86afe4f@thomas-guettler.de
Whole thread Raw
Responses Re: Profile what the production server is doing  (Julien Rouhaud <rjuju123@gmail.com>)
Re: Profile what the production server is doing  (Baron Schwartz <baron.schwartz@gmail.com>)
Re: Profile what the production server is doing  (Flo Rance <trourance@gmail.com>)
List pgsql-performance
Is there a tool which does this for PostgreSQL?

Take a "snapshot" of what the server is doing about 10 times per second.
Write this to a file.
After N hours you can aggregate the file.
What does the server do most of the time?
Which tables/index gets used the most.

Before optimizing a database, I would like to know what is going
on in the production system.

I know that there are internal tables like pg_stat_statements.
But I guess doing a snapshot every N millseconds will present a
better picture of what is going in in real life.

Is there already a tool which goes this way?

Or is there a better way?

Regards,
   Thomas Güttler

-- 
Thomas Guettler http://www.thomas-guettler.de/
I am looking for feedback: https://github.com/guettli/programming-guidelines


pgsql-performance by date:

Previous
From: Mark Kirkwood
Date:
Subject: Re: Why HDD performance is better than SSD in this case
Next
From: Julien Rouhaud
Date:
Subject: Re: Profile what the production server is doing