Improving the heapgetpage function improves performance in common scenarios
Started by Quan Zongliangover 2 years ago8 messages
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
Attachments:
heapgetpage.jpgimage/jpeg; name=heapgetpage.jpgDownload
���� JFIF H H �� @Exif MM * �i � �� ��ICC_PROFILE appl mntrRGB XYZ � acspAPPL APPL �� �-applOv����e�����=/
desc � 2cprt 0 Pwtpt � rXYZ � gXYZ � bXYZ � rTRC � chad � ,bTRC � gTRC � mluc enUS D E L L P 2 4 1 8 D mluc enUS 4 C o p y r i g h t A p p l e I n c . , 2 0 2 3XYZ �� �-XYZ o 6� �XYZ a� �~ rXYZ %� � ��para �sf32 � ����W ) ���������� � ���� �"