pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: lionel.duboeuf@boozter.com
To: pgsql-performance@postgresql.org
Subject: Re: Almost infinite query -> Different Query Plan when changing where clause value
Date: Mon, 15 Feb 2010 08:19:19 -0600
Message-ID: <4B790387020000250002F2CF@gw.wicourts.gov> (raw)

lionel duboeuf  wrote:
> Kevin Grittner a écrit :
 
>> I just reread your original email, and I'm not sure I understand
>> what you meant regarding VACUUM ANALYZE. If you run that right
>> beforehand, do you still get the slow plan for user 10?
 
> I confirm by executing manual "VACUUM ANALYZE" that the problem is
> solved.  But what i don't understand is that i would expect
> autovacuum to do the job.
 
I think this is the crux of the issue.  Boosting the
default_statistics_target or the statistics target for specific
columns might help, reducing autovacuum_analyze_scale_factor might
help, but I can't help wondering whether you inserted a large number
of rows for user 10 and then ran the query to select user 10 before
autovacuum had time to complete.  Does that seem possible?

-Kevin



view thread (12+ messages)  latest in thread

Message-ID: <4B790387020000250002F2CF@gw.wicourts.gov>
Permalink:  ../4B790387020000250002F2CF@gw.wicourts.gov/
Also on:    postgresql.org/message-id/4B790387020000250002F2CF@gw.wicourts.gov

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: Kevin.Grittner@wicourts.gov, lionel.duboeuf@boozter.com
  Subject: Re: Almost infinite query -> Different Query Plan when changing where clause value
  In-Reply-To: <4B790387020000250002F2CF@gw.wicourts.gov>
  References: <4B790387020000250002F2CF@gw.wicourts.gov>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox