views:

227

answers:

2

does anyone know of a postgres view / function / tool that could report on the slowest and most often used slower queries? i think this would be so useful for all sysadmins. thanks!

+2  A: 

I wrote such a tool some time ago. You can get it from here: http://svn.depesz.com/svn/pgsql-tools/trunk (file: analyze.pgsql.logs.pl)

There are (as of now) no real docs, so if you'll have problems with using it, please contact me directly at [email protected].

depesz
+2  A: 

PostgreSQL 8.4 comes with some addon modules that will help you with detailed analysis of this. They don't actually create reports, but they get you access to more data.

You can also look at pgfouine (http://pgfouine.projects.postgresql.org/). It generates nice-looking HTML reports.

Magnus Hagander