Re: estimated rows vs. actual rows

Поиск
Список
Период
Сортировка
От Mark Kirkwood
Тема Re: estimated rows vs. actual rows
Дата
Msg-id 42101EF6.8010403@coretech.co.nz
обсуждение исходный текст
Ответ на Re: estimated rows vs. actual rows  (Jaime Casanova <systemguards@gmail.com>)
Список pgsql-performance
Jaime Casanova wrote:
>
> But, IMHO, if the table has 143902 and it thinks will retrieve 2610
> (almost 1.81% of the total). it won't be faster with an index?
>

Depends on how those 2610 rows are distributed amongst the 143902. The
worst case scenario is each one of them in its own page. In that case
you have to read 2610 *pages*, which is probably a significant
percentage of the table.

You can find out this information from the pg_stats view (particularly
the correlation column).


Mark

В списке pgsql-performance по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: estimated rows vs. actual rows
Следующее
От: Hasnul Fadhly bin Hasan
Дата:
Сообщение: Autocommit