Techie Things

A blog with tech recipes and other technical information by jmiguel.

1-Minute Read

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

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

Recent Posts