Re: Slow execution time when querying view with WHERE clause

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jaime Casanova <systemguards(at)yahoo(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Slow execution time when querying view with WHERE clause
Date: 2004-11-24 06:11:48
Message-ID: 4593.1101276708@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Jaime Casanova <systemguards(at)yahoo(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2004-11-24 06:31:23 Re: Slow execution time when querying view with WHERE clause
Previous Message Jaime Casanova 2004-11-24 05:40:43 Re: Slow execution time when querying view with WHERE clause