Tom Lane wrote:
> Since you're complaining, I suppose this statistical estimate is way
> off :-(. What do you actually get from
>
> select count(*) from stl where
> stl_discounttype in ('','S','V')
> and stl_trxdate>='Jul 01, 2000' and stl_trxdate<='Jul 02, 2000'
> and stl_status='N';
7678
>
>
> select count(*) from item where
> itm_sectiontype='O'
> and itm_section >='101'
> and itm_section <='135';
> ?
>
9973
Table stl is quite big. Eg. if I run
select count(*) from stl where
stl_discounttype in ('','S','V')
and stl_trxdate>='Jul 01, 2000' and stl_trxdate<='Jul 31, 2000'
and stl_status='N';
The count is 157,997.
select count(*) from stl;
The count is 1,935,135.
Thanks & regards,
Thomas.