Обсуждение: HeapTupleSatisfies micro tuning

Поиск
Список
Период
Сортировка

HeapTupleSatisfies micro tuning

От
Simon Riggs
Дата:
I note that in HeapTupleSatisfies... we call
TransactionIdIsCurrentTransactionId() explicitly and then call it again
in TransactionIdIsInProgress(). Which means we also end up checking
twice whether each xid is normal also. 

It would seem easier to make a check TransactionIdIsRecent() early and
if true then check TransactionIdIsCurrentTransactionId() and then check
RecentTransactionIdIsInProgress(). That would avoid the multiple checks,
as well as save a few cycles since the IsCurrent check can be expensive
if we have many subtransactions.

--  Simon Riggs 2ndQuadrant  http://www.2ndQuadrant.com