]> granicus.if.org Git - postgresql/commit
Skip ambulkdelete scan if there's nothing to delete and the index is not
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 11 Feb 2006 23:31:34 +0000 (23:31 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 11 Feb 2006 23:31:34 +0000 (23:31 +0000)
commitfd267c1ebc363ae6b1bf586794fa5cc9e8cca43c
tree13c387759e392e99689d2a37a55db6a84f139bf5
parenta02f6ce33b593039213a8987ba651f121b64464c
Skip ambulkdelete scan if there's nothing to delete and the index is not
partial.  None of the existing AMs do anything useful except counting
tuples when there's nothing to delete, and we can get a tuple count
from the heap as long as it's not a partial index.  (hash actually can
skip anyway because it maintains a tuple count in the index metapage.)
GIST is not currently able to exploit this optimization because, due to
failure to index NULLs, GIST is always effectively partial.  Possibly
we should fix that sometime.
Simon Riggs w/ some review by Tom Lane.
doc/src/sgml/indexam.sgml
src/backend/access/gist/gistvacuum.c
src/backend/access/hash/hash.c
src/backend/access/index/indexam.c
src/backend/access/nbtree/nbtree.c
src/backend/commands/vacuum.c
src/backend/commands/vacuumlazy.c
src/include/access/genam.h