Initial queries of day slow - Mailing list pgsql-general

From Rebecca Clarke
Subject Initial queries of day slow
Date
Msg-id CAMChtdfUqgQN+sb4mzsJYc+1istaQDijPZJq8D7+5EMcXz=6rA@mail.gmail.com
Whole thread Raw
Responses Re: Initial queries of day slow  (Atri Sharma <atri.jiit@gmail.com>)
Re: Initial queries of day slow  (Albe Laurenz <laurenz.albe@wien.gv.at>)
Re: Initial queries of day slow  (Andrew Sullivan <ajs@crankycanuck.ca>)
List pgsql-general
Hi all.

I'm a bit stumped. At present I'm finding that queries to my database, that normally execute promptly, are taking a long time when they are executed first thing in the morning (after the database has been inactive for several hours). After the first execution, everything is back to normal. 

A while back I turned autovacuum off and now instead I run a daily cron at 3am that executes a script which does a VACUUM ANALYZE on each table. 

These are my details:

Debian GNU/Linux 6.0
Postgresql 9.1
Memory 4GB

shared_buffers = 1024MB
work_mem = 16MB 
maintenance_work_mem = 128MB 
effective_cache_size = 2048MB


Would love peoples opinions on what the issue could be.

Thanks



pgsql-general by date:

Previous
From: Stefan Keller
Date:
Subject: Re: Postgres as In-Memory Database?
Next
From: Atri Sharma
Date:
Subject: Re: Initial queries of day slow