From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mike Mascari <mascarm@mascari.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Slow execution time when querying view with WHERE clause
Date: Tue, 23 Nov 2004 12:54:05 -0500
Message-ID: <28237.1101232445@sss.pgh.pa.us> (raw)
In-Reply-To: <41A25C3B.3040608@mascari.com>
References: <41A25C3B.3040608@mascari.com>
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?
Are you sure you ANALYZEd this table recently?
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, mascarm@mascari.com
Subject: Re: Slow execution time when querying view with WHERE clause
In-Reply-To: <28237.1101232445@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