Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I recently started using PostgreSQL after using SQL Server for a while. Is there something like dm_exec_query_stats?

I haven't been able to find anything other than logging every long running query. I'm looking for something that won't fill up the disk quite as quickly.

share|improve this question
3  
the pg_stat_statements extension is probably the closest thing: postgresql.org/docs/current/static/pgstatstatements.html –  a_horse_with_no_name Sep 19 '14 at 20:29
1  
Not all Postgres experts are familiar with SQL Server details. You should explain the feature and add a link to MS documentation. –  Erwin Brandstetter Sep 19 '14 at 21:17
1  
There's also pg_stat_plans - github.com/2ndQuadrant/pg_stat_plans - and the auto_explain module –  Craig Ringer Sep 20 '14 at 12:06

1 Answer 1

The information_schema is your friend for db stats. In addition, you can write a relatively simple query up against pg_stat_activity if your looking for detailed data on your queries. Cheers.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.