Create a routine PageIndexMultiDelete() that replaces a loop around
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 22 Mar 2005 06:17:03 +0000 (06:17 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 22 Mar 2005 06:17:03 +0000 (06:17 +0000)
commitf017b0ed74f604ae2fc8f521c56b7f7c0e6c741a
tree36a6425ee579f15eb12f81d13df8d9c284297806
parent426069f61a403136fdd1c52719839d69c19c6ec3
Create a routine PageIndexMultiDelete() that replaces a loop around
PageIndexTupleDelete() with a single pass of compactification ---
logic mostly lifted from PageRepairFragmentation.  I noticed while
profiling that a VACUUM that's cleaning up a whole lot of deleted
tuples would spend as much as a third of its CPU time in
PageIndexTupleDelete; not too surprising considering the loop method
was roughly O(N^2) in the number of tuples involved.
src/backend/access/nbtree/nbtpage.c
src/backend/access/nbtree/nbtxlog.c
src/backend/storage/page/bufpage.c
src/include/storage/bufpage.h