![]() ![]() In many cases you want to be a lot more precise. If you change nf, the change will be done for the entire instance, which might be too much. You can do this using an init script or simply by calling the SQL function shown above. If you change this line in nf there is no need for a server restart. If you set log_min_duration_statement in nf to 5000, PostgreSQL will consider queries which take longer than 5 seconds to be slow queries and send them to the logfile. ![]() You have version choices: If you want to turn the slow query log on globally, you can change nf: In a default configuration the slow query log is not active. This way, slow queries can easily be spotted so that developers and administrators can quickly react and know where to look. The idea is: If a query takes longer than a certain amount of time, a line will be sent to the log. Making use of the PostgreSQL slow query log – method 1Ī more traditional way to attack slow queries is to make use of PostgreSQL’s slow query log.
0 Comments
Leave a Reply. |