Tech Thoughts

A blog with my opinions and thoughts on technology

Home Archives jmiguel.eu
2019-09-13

Show slow queries on postgresql

In postgresql it’s pretty easy to show which queries can be optimized on
your application. Or, at least, which queries are more time consuming.

Just execute the following statement on your database

1
ALTER DATABASE myDatabase SET log_min_duration_statement = 5000;

to show which queres takes more than 5 seconds.

Output will go to your postgresql system log.

More information about Postgresql performance

Share
  • eng
  • linux
Newer
Getting Hyperfido U2F keys working on Linux (Ubuntu or Mint)
Older
Add a new ssh authorized key to a remote host... in one single line

Tags

  • aws
  • docker
  • eng
  • esp
  • esxi
  • general
  • git
  • html
  • linux
  • vmware

Tag Cloud

aws docker eng esp esxi general git html linux vmware

Archives

  • April 2021
  • January 2021
  • January 2020
  • September 2019
  • June 2019
  • May 2019
  • April 2019
  • February 2019
  • January 2019
  • November 2018
  • October 2018
  • September 2018

Recent Posts

  • New home, this blog has been migrated
  • My new 2FA setup - Authy + oathtool
  • Getting Hyperfido U2F keys working on Linux (Ubuntu or Mint)
  • Show slow queries on postgresql
  • Add a new ssh authorized key to a remote host... in one single line
© 2021 jmiguel rodriguez
Powered by Hexo
Home Archives jmiguel.eu