]> granicus.if.org Git - postgresql/commit
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)
commit94e03330cbd163378e43094388f87fcba4801ba8
tree29fc477dae5e1be0c985db04ba2cc36389648ec6
parent775d28302cda48b3f22a2f4f9067de0cf5192fff
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