Grzegorz Jaśkiewicz wrote:
On Mon, Feb 9, 2009 at 12:50 PM, Herouth Maoz <herouth@unicell.co.il> wrote:
I hope someone can clue me in based on the results of explain analyze.
Did you have a chance to run vmstat on it, and post it here ? Maybe -
if db resides on the same disc with everything else, something
(ab)uses that much io, and it has to wait.
I haven't ran it, but it's worth mentioning that the data is on a separate device than the system/users. Also, the system is used only for the reporting system. Other than PostgreSQL and the cron job that runs this query, nothing runs on the system at night. Reports start being produced around 7:00 AM which should give the query ample time to finish (almost 3 hours) before any contention starts.
Herouth