Kevin Grittner <kgrittn@ymail.com> writes:
> Carlos Henrique Reimer <carlos.reimer@opendb.com.br> wrote:
>> I`m trying to figure out why a query runs in 755ms in the morning
>> and 20054ms (26x) in the evening.
> I would make autovacuum settings much more aggressive, or schedule
> periodic VACUUM and/or ANALYZE runs during the day.
I'm wondering about cache effects, ie memory already contains desired
pages in the morning (perhaps as a side-effect of queries run overnight)
and not so much by the evening. If so it's not clear that additional
VACUUM activity would make things better.
But in any case it's hard to diagnose this without EXPLAIN ANALYZE
output.
regards, tom lane