Re: estimated rows vs. actual rows

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: estimated rows vs. actual rows
Дата
Msg-id 19674.1108352281@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: estimated rows vs. actual rows  (Jaime Casanova <systemguards@gmail.com>)
Список pgsql-performance
Jaime Casanova <systemguards@gmail.com> writes:
> 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?

That's almost one row in fifty.  We don't know how wide the table is,
but it's certainly possible that there are order-of-a-hundred rows
on each page; in which case the indexscan is likely to hit every page.
Twice.  Not in sequence.  Only if the selected rows are pretty well
clustered in a small part of the table is this going to be a win
over a seqscan.

            regards, tom lane

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

Предыдущее
От: Jaime Casanova
Дата:
Сообщение: Re: estimated rows vs. actual rows
Следующее
От: Mark Kirkwood
Дата:
Сообщение: Re: estimated rows vs. actual rows