Re: Changes improve the performance of INSERT and UPDATE

From: Hiroki Kataoka <kataoka(at)interwiz(dot)koganei(dot)tokyo(dot)jp>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Changes improve the performance of INSERT and UPDATE
Date: 2005-07-17 06:03:39
Message-ID: 42D9F4BB.3050000@interwiz.koganei.tokyo.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Hiroki Kataoka <kataoka(at)interwiz(dot)koganei(dot)tokyo(dot)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(at)interwiz(dot)jp>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kris Jurka 2005-07-17 06:37:32 Re: Buildfarm issues on specific machines
Previous Message Tom Lane 2005-07-17 05:37:31 Re: Changes improve the performance of INSERT and UPDATE