Posted By

limepix on 12/30/11


Tagged

postgres


Versions (?)

show longest queries in postgres log


 / Published in: Bash
 

maybe you must replace "Dauer" with the correct spelling in your logging language (i´ve done this on a german system). also make sure, that the duration (the value in ms) column is the 5th one in your log file.

  1. grep "Dauer:" /path/to/postgres.log | sort -nr -k 5 | head -100 | less

Report this snippet  

You need to login to post a comment.