Re: [WIP PATCH] Index scan offset optimisation using visibility map

Поиск
Список
Период
Сортировка
От Andrey Borodin
Тема Re: [WIP PATCH] Index scan offset optimisation using visibility map
Дата
Msg-id 78B84FA5-D5A4-4CBC-B249-3A9CE432D7C0@yandex-team.ru
обсуждение исходный текст
Ответ на Re: [WIP PATCH] Index scan offset optimisation using visibility map  (Michail Nikolaev <michail.nikolaev@gmail.com>)
Ответы Re: [WIP PATCH] Index scan offset optimisation using visibility map  (Andrey Borodin <x4mmm@yandex-team.ru>)
Список pgsql-hackers
Hi!

I've played with patch. I observe that in some expected scenarios it reduces read buffers significantly.

> 14 февр. 2018 г., в 0:04, Michail Nikolaev <michail.nikolaev@gmail.com> написал(а):
> Patch updated + rebased on master. check-world is passing.

Minor spots:
There are some trailing whitespaces at line ends
> Offset cannot be optimized because parallel execution
I'd replace with
> Offset cannot be optimized [in spite of | due to] parallel execution

More important thing: now nodeindexonlyscan.c and nodeindexscan.c share more similar code and comments. I do not think
itis strictly necessary to avoid, but we certainly have to answer the question: 
Is it possible to refactor code to avoid duplication?
Currently, patch is not invasive, touches only some relevant code. If refactoring will make it shotgun-suregery, I
thinkit is better to avoid it. 


> Still not sure about questions 0, 2, 3, 4, 5, and 6 from initial mail (about explain, explain analyze, documentation
andoptimiser). 

I think that I'd be cool if EXPLAIN ANALYZE printed heap fetch information if "Index-Only" way was used. But we already
havethis debug information in form of reduced count in "Buffers". There is nothing to add to plain EXPLAIN, in my
opinion.
From my point of view, you should add to patch some words here
https://www.postgresql.org/docs/current/static/indexes-index-only-scans.html
and, if patch will be accepted, here
https://wiki.postgresql.org/wiki/Index-only_scans

I do not know if it is possible to take into account this optimization in cost estimation.
Does Limit node take cost of scanning into startup cost?

Thanks!

Best regards, Andrey Borodin.

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: ALTER TABLE ADD COLUMN fast default
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: ALTER TABLE ADD COLUMN fast default