Tom Lane wrote: > Hiroki Kataoka <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match