Re: Query with limit goes from few ms to hours

From: "Kevin Grittner" <kgrittn(at)mail(dot)com>
To: "henk de wit" <henk53602(at)hotmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Query with limit goes from few ms to hours
Date: 2012-10-23 18:33:16
Message-ID: 20121023183316.179560@gmx.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

henk de wit wrote:

> Well, what do you know! That did work indeed. Immediately after the
> ANALYZE on that parent table (taking only a few seconds) a fast
> plan was created and the query executed in ms again. Silly me, I
> should have tried that earlier.

Of course, if your autovacuum settings are aggressive enough, you
should gernerally not need to run ANALYZE explicitly. You should
double-check that autovacuum is turned on and configured at least as
aggressively as the default settings, or you will probably get little
surprises like this when you least expect them.

-Kevin

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Steve Crawford 2012-10-23 20:08:15 Re: Query with limit goes from few ms to hours
Previous Message Shaun Thomas 2012-10-23 16:49:00 Re: Tons of free RAM. Can't make it go away.