From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jaime Casanova <systemguards@yahoo.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Slow execution time when querying view with WHERE clause
Date: Wed, 24 Nov 2004 01:11:48 -0500
Message-ID: <4593.1101276708@sss.pgh.pa.us> (raw)
In-Reply-To: <20041124054043.88464.qmail@web50002.mail.yahoo.com>
References: <20041124054043.88464.qmail@web50002.mail.yahoo.com>
Jaime Casanova <systemguards@yahoo.com> writes:
> Tom Lane wrote:
>> Why is it so completely off about the selectivity
>> of the IS NULL clause?
> null values are not indexable, is that your question?
Uh, no. The problem is that the IS NULL condition matched all 48 rows
of the table, but the planner thought it would only match one row. This
is definitely covered by the pg_stats statistics, and with only 48 live
rows there couldn't possibly have been any sampling error, so what the
heck went wrong there?
regards, tom lane
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, systemguards@yahoo.com
Subject: Re: Slow execution time when querying view with WHERE clause
In-Reply-To: <4593.1101276708@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