Re: Improving the heapgetpage function improves performance in common scenarios

Поиск
Список
Период
Сортировка
От John Naylor
Тема Re: Improving the heapgetpage function improves performance in common scenarios
Дата
Msg-id CAFBsxsHd1NajmezF8rReBoPfxxgi2GuyObni4kWmo8gWKPm3mg@mail.gmail.com
обсуждение исходный текст
Ответ на Improving the heapgetpage function improves performance in common scenarios  (Quan Zongliang <quanzongliang@yeah.net>)
Ответы Re: Improving the heapgetpage function improves performance in common scenarios  (Quan Zongliang <quanzongliang@yeah.net>)
Список pgsql-hackers

On Thu, Aug 24, 2023 at 5:55 PM Quan Zongliang <quanzongliang@yeah.net> wrote:

> In the function heapgetpage. If a table is not updated very frequently.
> Many actions in tuple loops are superfluous. For all_visible pages,
> loctup does not need to be assigned, nor does the "valid" variable.
> CheckForSerializableConflictOutNeeded from
> HeapCheckForSerializableConflictOut function, it only need to inspect at

Thanks for submitting! A few weeks before this, there was another proposal, which specializes code for all paths, not just one. That patch also does so without duplicating the loop:

https://www.postgresql.org/message-id/20230716015656.xjvemfbp5fysjiea@awork3.anarazel.de

> the beginning of the cycle only once. Using vtune you can clearly see
> the result (attached heapgetpage.jpg).
>
> So by splitting the loop logic into two parts, the vtune results show
> significant improvement (attached heapgetpage-allvis.jpg).

For future reference, it's not clear at all from the screenshots what the improvement will be for the user. In the above thread, the author shares testing methodology as well as timing measurements. This is useful for reproducibilty, as well as convincing others that the change is important.

--
John Naylor
EDB: http://www.enterprisedb.com

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

Предыдущее
От: Dilip Kumar
Дата:
Сообщение: Re: persist logical slots to disk during shutdown checkpoint
Следующее
От: tender wang
Дата:
Сообщение: Should consider materializing the cheapest inner path in consider_parallel_nestloop()