diff options
author | Alexander Korotkov <akorotkov@postgresql.org> | 2024-07-28 13:50:57 +0300 |
---|---|---|
committer | Alexander Korotkov <akorotkov@postgresql.org> | 2024-07-28 13:50:57 +0300 |
commit | cdd6ab9d1f5396ec1097d51c21a224aa41118c9c (patch) | |
tree | 51fdf2746a6732b1fd6c70337333f86a9316d02c /src/backend/utils/init/postinit.c | |
parent | b181062aa5727a013c96b64476f884c992b5068d (diff) | |
download | postgresql-cdd6ab9d1f5396ec1097d51c21a224aa41118c9c.tar.gz postgresql-cdd6ab9d1f5396ec1097d51c21a224aa41118c9c.zip |
amcheck: Optimize speed of checking for unique constraint violation
Currently, when amcheck validates a unique constraint, it visits the heap for
each index tuple. This commit implements skipping keys, which have only one
non-dedeuplicated index tuple (quite common case for unique indexes). That
gives substantial economy on index checking time.
Reported-by: Noah Misch
Discussion: https://postgr.es/m/20240325020323.fd.nmisch%40google.com
Author: Alexander Korotkov, Pavel Borisov
Diffstat (limited to 'src/backend/utils/init/postinit.c')
0 files changed, 0 insertions, 0 deletions