pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruno Wolff III <bruno@wolff.to>
Cc: Bernd Heller <bdheller@users.sourceforge.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: column without pg_stats entry?!
Date: Fri, 21 Jan 2005 01:02:59 -0500
Message-ID: <12411.1106287379@sss.pgh.pa.us> (raw)
In-Reply-To: <20050121002620.GB16417@wolff.to>
References: <11D72EC4-6ACC-11D9-A12E-000A957B8C6E@users.sourceforge.net>
	<20050121002620.GB16417@wolff.to>

Bruno Wolff III <bruno@wolff.to> writes:
>   Bernd Heller <bdheller@users.sourceforge.net> wrote:
>> there is no entry in pg_stats for that column at all!! I can only 
>> suspect that this has to do with the column being all null.

> Someone else reported this recently and I think it is going to be fixed.

Yeah, this was griped of a little bit ago, but I felt it was too close
to 8.0 release to risk fooling with for this cycle.

> In the short run you could add an IS NOT NULL clause to your query.
> The optimizer doesn't know that < being TRUE implies IS NOT NULL and
> so the partial index won't be used unless you add that clause explicitly.

Actually, as of 8.0 the optimizer *does* know that.  I'm a bit surprised
that it didn't pick the partial index, since even without any analyze
stats, the small physical size of the partial index should have clued it
that there weren't many such tuples.  Could we see EXPLAIN output for
both cases (both settings of enable_seqscan)?

			regards, tom lane



view thread (4+ messages)  latest in thread

Message-ID: <12411.1106287379@sss.pgh.pa.us>
Permalink:  ../12411.1106287379@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/12411.1106287379@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, bruno@wolff.to, bdheller@users.sourceforge.net
  Subject: Re: column without pg_stats entry?!
  In-Reply-To: <12411.1106287379@sss.pgh.pa.us>

* 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