From: | Jaime Casanova <systemguards(at)yahoo(dot)com> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Slow execution time when querying view with WHERE clause |
Date: | 2004-11-24 05:40:43 |
Message-ID: | 20041124054043.88464.qmail@web50002.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
--- Mike Mascari <mascarm(at)mascari(dot)com> escribió:
> Tom Lane wrote:
> > Mike Mascari <mascarm(at)mascari(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-11-24 06:11:48 | Re: Slow execution time when querying view with WHERE clause |
Previous Message | Tom Lane | 2004-11-24 05:32:42 | Re: Big number of schemas (3500) into a single database |