aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistsplit.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2019-03-03 16:57:14 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2019-03-03 16:57:14 -0500
commit80b9e9c4664a020ebd14889046bd8d22a17d1ca6 (patch)
tree62d9c7a81806693ff9c8c7e01f438f0fa0b64596 /src/backend/access/gist/gistsplit.c
parent78b408a20a5a19486f0ed833466d0de342c7e471 (diff)
downloadpostgresql-80b9e9c4664a020ebd14889046bd8d22a17d1ca6.tar.gz
postgresql-80b9e9c4664a020ebd14889046bd8d22a17d1ca6.zip
Improve performance of index-only scans with many index columns.
StoreIndexTuple was a loop over index_getattr, which is O(N^2) if the index columns are variable-width, and the performance impact is already quite visible at ten columns. The obvious move is to replace that with a call to index_deform_tuple ... but that's *also* a loop over index_getattr. Improve it to be essentially a clone of heap_deform_tuple. (There are a few other places that loop over all index columns with index_getattr, and perhaps should be changed likewise, but most of them don't seem performance-critical. Anyway, the rest would mostly only be interested in the index key columns, which there aren't likely to be so many of. Wide index tuples are a new thing with INCLUDE.) Konstantin Knizhnik Discussion: https://postgr.es/m/e06b2d27-04fc-5c0e-bb8c-ecd72aa24959@postgrespro.ru
Diffstat (limited to 'src/backend/access/gist/gistsplit.c')
0 files changed, 0 insertions, 0 deletions