Re: Index only scan sometimes switches to sequential scan for small amount of rows

Поиск
Список
Период
Сортировка
От Feike Steenbergen
Тема Re: Index only scan sometimes switches to sequential scan for small amount of rows
Дата
Msg-id CAK_s-G0O4VK-J-9BQtShU1_Osr3NG1_T7VDDXRniXTd9VYPdHw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Index only scan sometimes switches to sequential scan for small amount of rows  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Ответы Re: Index only scan sometimes switches to sequential scan for small amount of rows  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
Hi, thanks for having a look and thinking with us

On 25 March 2015 at 13:45, Tomas Vondra <tomas.vondra@2ndquadrant.com> wrote:
> Can you post results for this query?
>
> SELECT stats, COUNT(*) FROM print_list group by 1

   status   |  count
----------------+---------
 ERROR          |     159
 PREPARED       |   10162
 PRINTED        | 3551367
 TO_BE_PREPARED |       2
(4 rows)

>> We can also increase the 'Stats target' for this table, which will
>> cause the statistics to contain information about 'NOT_YET_PRINTED'
>> more often, but even then, it may not find any of these records, as
>> they sometimes do not exist.
>
> This is a better solution, IMHO.

We'll have a go at this, also if what you say about values having to
appear at least twice, the other values may make it into
most_common_*, which would make it clearer to us.

We're a bit hesitant to decrease random_page_cost (currently 3 in this
cluster) as a lot more is happening on this database.


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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: Index only scan sometimes switches to sequential scan for small amount of rows
Следующее
От: Feike Steenbergen
Дата:
Сообщение: Re: Index only scan sometimes switches to sequential scan for small amount of rows