Improving the heapgetpage function improves performance in common scenarios

Поиск
Список
Период
Сортировка
От Quan Zongliang
Тема Improving the heapgetpage function improves performance in common scenarios
Дата
Msg-id a9f40066-3d25-a240-4229-ec2fbe94e7a5@yeah.net
обсуждение исходный текст
Ответы Re: Improving the heapgetpage function improves performance in common scenarios
Список pgsql-hackers
Hi

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 
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).

The test data uses TPC-H's table "orders" with a scale=20, 30 million rows.


Quan Zongliang
Вложения

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

Предыдущее
От: Ashutosh Bapat
Дата:
Сообщение: Re: Report planning memory in EXPLAIN ANALYZE
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Use FD_CLOEXEC on ListenSockets (was Re: Refactoring backend fork+exec code)