Re: 7.0.2 and 6.5.3 performance - Mailing list pgsql-general

From lec
Subject Re: 7.0.2 and 6.5.3 performance
Date
Msg-id 39C5A999.E7F0EF63@pc.jaring.my
Whole thread Raw
In response to 7.0.2 and 6.5.3 performance  (lec <englim@pc.jaring.my>)
List pgsql-general
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.



pgsql-general by date:

Previous
From: Neil Conway
Date:
Subject: Re: How to tune a SELECT in 7.0.2
Next
From: "luc00"
Date:
Subject: q: SQL interface to multiple table DB ?