Re: 7.0.2 and 6.5.3 performance

Поиск
Список
Период
Сортировка
От lec
Тема Re: 7.0.2 and 6.5.3 performance
Дата
Msg-id 39C5A999.E7F0EF63@pc.jaring.my
обсуждение исходный текст
Ответ на 7.0.2 and 6.5.3 performance  (lec <englim@pc.jaring.my>)
Список 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 по дате отправления:

Предыдущее
От: Neil Conway
Дата:
Сообщение: Re: How to tune a SELECT in 7.0.2
Следующее
От: "luc00"
Дата:
Сообщение: q: SQL interface to multiple table DB ?