postgresql/src/backend
Tom Lane 80b9e9c466 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
2019-03-03 16:57:14 -05:00
..
access Improve performance of index-only scans with many index columns. 2019-03-03 16:57:14 -05:00
bootstrap Remove argument isprimary from index_build() 2019-01-24 07:57:09 +09:00
catalog Move code for managing PartitionDescs into a new file, partdesc.c 2019-02-21 11:45:02 -05:00
commands Initialize variable to silence compiler warning. 2019-02-27 09:14:34 -08:00
executor Improve performance of index-only scans with many index columns. 2019-03-03 16:57:14 -05:00
foreign Update copyright for 2019 2019-01-02 12:44:25 -05:00
jit Renaming for new subscripting mechanism 2019-02-01 12:50:32 -03:00
lib Make use of compiler builtins and/or assembly for CLZ, CTZ, POPCNT. 2019-02-15 23:22:33 -05:00
libpq Get rid of another unconstify through API changes 2019-02-14 20:44:47 +01:00
main Replace @postgresql.org with @lists.postgresql.org for mailinglists 2019-01-19 19:06:35 +01:00
nodes Allow user control of CTE materialization, and change the default behavior. 2019-02-16 16:11:12 -05:00
optimizer Teach optimizer's predtest.c more things about ScalarArrayOpExpr. 2019-03-01 17:14:17 -05:00
parser Standardize some more loops that chase down parallel lists. 2019-02-28 14:25:01 -05:00
partitioning Move code for managing PartitionDescs into a new file, partdesc.c 2019-02-21 11:45:02 -05:00
po Translation updates 2018-06-25 12:37:18 +02:00
port Add shared_memory_type GUC. 2019-02-03 12:47:26 +01:00
postmaster Report correct name in autovacuum "work items" activity 2019-02-22 13:00:16 -03:00
regex Update copyright for 2019 2019-01-02 12:44:25 -05:00
replication Use a virtual rather than a heap slot in two places where that suffices. 2019-03-01 17:26:43 -08:00
rewrite Further fixing for multi-row VALUES lists for updatable views. 2019-03-03 10:51:13 +00:00
snowball Update copyright for 2019 2019-01-02 12:44:25 -05:00
statistics Rename nodes/relation.h to nodes/pathnodes.h. 2019-01-29 16:49:25 -05:00
storage Clear the local map when not used. 2019-03-01 07:38:47 +05:30
tcop More unconstify use 2019-02-13 11:50:16 +01:00
tsearch Update copyright for 2019 2019-01-02 12:44:25 -05:00
utils Consider only relations part of partition trees in partition functions 2019-03-02 18:18:59 +09:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
Makefile Ensure link commands list *.o files before LDFLAGS. 2019-01-02 13:57:54 -05:00
nls.mk Translation updates 2018-06-25 12:37:18 +02:00