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

Posted by David Walker on
I know this has nothing to do with your question but the postgres answer is to set the following in your postgresql.conf

stats_start_collector = true
stats_command_string = true

after restart the following query will show currently running queries

psql -U postgres template1 -c "select * from pg_stat_activity"