From: Jaime Casanova <systemguards@yahoo.com>
To: pgsql-performance@postgresql.org
Subject: Re: Slow execution time when querying view with WHERE clause
Date: Tue, 23 Nov 2004 23:40:43 -0600 (CST)
Message-ID: <20041124054043.88464.qmail@web50002.mail.yahoo.com> (raw)
In-Reply-To: <41A3EC1F.6040706@mascari.com>
--- Mike Mascari <mascarm@mascari.com> escribió:
> Tom Lane wrote:
> > Mike Mascari <mascarm@mascari.com> writes:
> >
> >>When I query the view with a simple filter, I get:
> >
> >
> >>explain analyze select * from p_areas where
> deactive is null;
> >
> >
> > The problem seems to be here:
> >
> >
> >> -> Seq Scan on _areas a (cost=0.00..2.48
> rows=1 width=163) (actual time=0.037..0.804 rows=48
> loops=1)
> >> Filter: (deactive IS NULL)
> >
> >
> > Why is it so completely off about the selectivity
> of the IS NULL clause?
null values are not indexable, is that your question?
If it is your question then create a partial index
with where deactive is null.
regards,
Jaime Casanova
_________________________________________________________
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com
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: systemguards@yahoo.com
Subject: Re: Slow execution time when querying view with WHERE clause
In-Reply-To: <20041124054043.88464.qmail@web50002.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