Tom Lane wrote:
> Hiroki Kataoka <kataoka@interwiz.koganei.tokyo.jp> writes:
>
>>This small patch improves the performance of INSERT and UPDATE. By my
>>machine, these changes raised the performance about 5%~10% in pgbench.
>
> Wouldn't it be a lot less invasive to search down from the end, instead
> of changing the page header format?
If the last of line pointer array always be free slot, your method is
effective. But usual line pointer array is full, or worm-eaten after
vacuum, so there is no benefit.
My method is to have the current insertion position of line pointer
array. This prevents that PageAddItem scan same range of line pointer
array vainly. A free slot is rarely produced, so it is not necessary to
search from a head (or bottom in your method) each time.
--
Hiroki Kataoka <kataoka@interwiz.jp>