summaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistutil.c
diff options
context:
space:
mode:
authorTomas Vondra <tomas.vondra@postgresql.org>2021-03-23 00:47:06 +0100
committerTomas Vondra <tomas.vondra@postgresql.org>2021-03-23 00:47:09 +0100
commit8e4b332e88b8339408a3aa8c62bc93d96b67c808 (patch)
tree846b32ea51c4f91aa87e9d5f240e2d09cd455d3e /src/backend/access/gist/gistutil.c
parent72ccf55cb99c6450dfb77f2f8f4a28b5c049ef7a (diff)
downloadpostgresql-8e4b332e88b8339408a3aa8c62bc93d96b67c808.tar.gz
Optimize allocations in bringetbitmap
The bringetbitmap function allocates memory for various purposes, which may be quite expensive, depending on the number of scan keys. Instead of allocating them separately, allocate one bit chunk of memory an carve it into smaller pieces as needed - all the pieces have the same lifespan, and it saves quite a bit of CPU and memory overhead. Author: Tomas Vondra <tomas.vondra@postgresql.org> Reviewed-by: Alvaro Herrera <alvherre@alvh.no-ip.org> Reviewed-by: Mark Dilger <hornschnorter@gmail.com> Reviewed-by: Alexander Korotkov <aekorotkov@gmail.com> Reviewed-by: Masahiko Sawada <masahiko.sawada@enterprisedb.com> Reviewed-by: John Naylor <john.naylor@enterprisedb.com> Discussion: https://postgr.es/m/c1138ead-7668-f0e1-0638-c3be3237e812@2ndquadrant.com
Diffstat (limited to 'src/backend/access/gist/gistutil.c')
0 files changed, 0 insertions, 0 deletions