pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Brian Herlihy <btherl@yahoo.com.au>
To: Postgresql Performance <pgsql-performance@postgresql.org>
Subject: Re: An unwanted seqscan
Date: Wed, 14 Feb 2007 17:30:46 -0800 (PST)
Message-ID: <20070215013046.64730.qmail@web52310.mail.yahoo.com> (raw)

Hi Tom,

Sorry, I didn't ask the right question.  I meant to ask "Why does it estimate a smaller cost for the seqscan?"

With some further staring I was able to find the bad estimate and fix it by increasing the relevant statistics target.

Thanks,
Brian

----- Original Message ----
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Brian Herlihy <btherl@yahoo.com.au>
Cc: Postgresql Performance <pgsql-performance@postgresql.org>
Sent: Wednesday, 14 February, 2007 4:53:54 PM
Subject: Re: [PERFORM] An unwanted seqscan 

Brian Herlihy <btherl@yahoo.com.au> writes:
> I am having trouble understanding why a seqscan is chosen for this query.

As far as anyone can see from this output, the planner's decisions are
correct: it prefers the plans with the smaller estimated cost.  If you
want us to take an interest, provide some more context --- EXPLAIN
ANALYZE output for starters.

            regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq






view thread (3+ messages)

Message-ID: <20070215013046.64730.qmail@web52310.mail.yahoo.com>
Permalink:  ../20070215013046.64730.qmail@web52310.mail.yahoo.com/
Also on:    postgresql.org/message-id/20070215013046.64730.qmail@web52310.mail.yahoo.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: btherl@yahoo.com.au
  Subject: Re: An unwanted seqscan
  In-Reply-To: <20070215013046.64730.qmail@web52310.mail.yahoo.com>

* 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