Re: [9.2devel] why it doesn't do index scan only?

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: [9.2devel] why it doesn't do index scan only?
Дата
Msg-id CAFj8pRB9rUAUjAy_bNyPrRHEJnZBXpz3qWwomuejKQXC-0WV-w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [9.2devel] why it doesn't do index scan only?  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: [9.2devel] why it doesn't do index scan only?  (Thom Brown <thom@linux.com>)
Список pgsql-general
2011/10/9 Pavel Stehule <pavel.stehule@gmail.com>:
> 2011/10/9 Tom Lane <tgl@sss.pgh.pa.us>:
>> Pavel Stehule <pavel.stehule@gmail.com> writes:
>>> 2011/10/9 Thom Brown <thom@linux.com>:
>>>> On 9 October 2011 04:35, Pavel Stehule <pavel.stehule@gmail.com> wrote:
>>>>> It has a sense - index only scan  it is faster (and significantly
>>>>> faster) on wider tables - or tables with strings where TOAST is not
>>>>> active. Maybe there is a some issue because on thin tables is slower
>>>>> (and I expect a should be faster everywhere).
>>
>>>> No, that's my point, I re-tested it on a table with just 2 int
>>>> columns, and the results are roughly the same.  I added all the
>>>> columns to make it expensive to fetch the  column being queried.
>>
>>> then I don't understand
>>
>> Are you sure you've remembered to vacuum the test table?  I get results
>> like yours (ie, no speed benefit for index-only scan) if the table
>> doesn't have its visibility-map bits set.
>
> it should be - I didn't do VACUUM
>

yes, After VACUUM I got a significantly better times - index only scan
is about 5-6x better

Regards

Pavel Stehule

>
> Regards
>
> Pavel
>>
>>                        regards, tom lane
>>
>

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: [9.2devel] why it doesn't do index scan only?
Следующее
От: "fanlijing"
Дата:
Сообщение: how to save a bytea value into a file?