O'Reilly logo

PostgreSQL 9 Administration Cookbook by Hannu Krosing, Simon Riggs

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Why are my queries slowing down?

Queries that used to run in tens of milliseconds suddenly take several seconds.

A summary query for a report that used to run in a few seconds takes half an hour to complete.

Here are some ways to find out what is slowing them down.

Getting ready

Any questions of type "why is this different today than it was last week?", are much easier to answer if you have some kind of historic data collecting set up.

Things such as Cacti or Munin for monitoring general server characteristics (CPU and RAM usage, disk I/O, network traffic, load average) are very useful to see what has changed recently, and to try to correlate this with observed performance of some database operations.

Also, collecting historic statistics data from ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required