pgsql: Skip ambulkdelete scan if there's nothing to delete and the index
От | tgl@postgresql.org (Tom Lane) |
---|---|
Тема | pgsql: Skip ambulkdelete scan if there's nothing to delete and the index |
Дата | |
Msg-id | 20060211233134.9B9E19DC862@postgresql.org обсуждение исходный текст |
Список | pgsql-committers |
Log Message: ----------- 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. Modified Files: -------------- pgsql/doc/src/sgml: indexam.sgml (r2.7 -> r2.8) (http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/indexam.sgml.diff?r1=2.7&r2=2.8) pgsql/src/backend/access/gist: gistvacuum.c (r1.13 -> r1.14) (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/gist/gistvacuum.c.diff?r1=1.13&r2=1.14) pgsql/src/backend/access/hash: hash.c (r1.85 -> r1.86) (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/hash/hash.c.diff?r1=1.85&r2=1.86) pgsql/src/backend/access/index: indexam.c (r1.89 -> r1.90) (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/index/indexam.c.diff?r1=1.89&r2=1.90) pgsql/src/backend/access/nbtree: nbtree.c (r1.138 -> r1.139) (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/nbtree/nbtree.c.diff?r1=1.138&r2=1.139) pgsql/src/backend/commands: vacuum.c (r1.323 -> r1.324) (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/vacuum.c.diff?r1=1.323&r2=1.324) vacuumlazy.c (r1.65 -> r1.66) (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/vacuumlazy.c.diff?r1=1.65&r2=1.66) pgsql/src/include/access: genam.h (r1.56 -> r1.57) (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/access/genam.h.diff?r1=1.56&r2=1.57)
В списке pgsql-committers по дате отправления: