Tom Lane wrote:
Um ... doh ... analyze.c about line 1550:
/* We can only compute valid stats if we found some non-null values. */
if (nonnull_cnt > 0)
...
There's a bit of an epistemological issue here: if we didn't actually
find any nonnull values in our sample, is it legitimate to
Mike Mascari <[EMAIL PROTECTED]> writes:
> Tom Lane wrote:
>> Why is it so completely off about the selectivity of the IS NULL clause?
> I think this is a bug in ANALYZE not constructing statistics for columns
> whose data is entirely NULL:
Um ... doh ... analyze.c about line 1550:
/* We ca
Jaime Casanova <[EMAIL PROTECTED]> 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
--- Mike Mascari <[EMAIL PROTECTED]> escribió:
> Tom Lane wrote:
> > Mike Mascari <[EMAIL PROTECTED]> 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:
> >
Tom Lane wrote:
Mike Mascari <[EMAIL PROTECTED]> 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=
Mike Mascari <[EMAIL PROTECTED]> 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 loop
Mike Mascari wrote:
I have the following view:
create or replace view market.p_areas as
select a.*
from _areas a
where a.area in (
select b.area
from _bins b, _inventories i, _offers o, _pricemembers p
where b.bin = i.bin and
i.inventory = o.inventory and
o.pricegroup = p.pricegroup and
p.buy
I have the following view:
create or replace view market.p_areas as
select a.*
from _areas a
where a.area in (
select b.area
from _bins b, _inventories i, _offers o, _pricemembers p
where b.bin = i.bin and
i.inventory = o.inventory and
o.pricegroup = p.pricegroup and
p.buyer in (
select s.s