Skip site navigation (1) Skip section navigation (2)

Re: Slow execution time when querying view with WHERE clause

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mike Mascari <mascarm(at)mascari(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Slow execution time when querying view with WHERE clause
Date: 2004-11-23 17:54:05
Message-ID: 28237.1101232445@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
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?
Are you sure you ANALYZEd this table recently?

			regards, tom lane

In response to

Responses

pgsql-performance by date

Next:From: Dave PageDate: 2004-11-23 20:12:21
Subject: Re: scalability issues on win32
Previous:From: Cott LangDate: 2004-11-23 17:20:07
Subject: Re: Some quick Opteron 32-bit/64-bit results

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group