• Tom Lane's avatar
    Skip ambulkdelete scan if there's nothing to delete and the index is not · fd267c1e
    Tom Lane authored
    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.
    fd267c1e
indexam.c 22.8 KB