postgresql/src
Peter Geoghegan f21668f328 Add "split after new tuple" nbtree optimization.
Add additional heuristics to the algorithm for locating an optimal split
location.  New logic identifies localized monotonically increasing
values in indexes with multiple columns.  When this insertion pattern is
detected, page splits split just after the new item that provoked a page
split (or apply leaf fillfactor in the style of a rightmost page split).
This optimization is a variation of the long established leaf fillfactor
optimization used during rightmost page splits.

50/50 page splits are only appropriate with a pattern of truly random
insertions, where the average space utilization ends up at 65% - 70%.
Without this patch, affected cases have leaf pages that are no more than
about 50% full on average.  Future insertions can never make use of the
free space left behind.  With this patch, affected cases have leaf pages
that are about 90% full on average (assuming a fillfactor of 90).

Localized monotonically increasing insertion patterns are presumed to be
fairly common in real-world applications.  There is a fair amount of
anecdotal evidence for this.  Both pg_depend system catalog indexes
(pg_depend_depender_index and pg_depend_reference_index) are at least
20% smaller after the regression tests are run when the optimization is
available.  Furthermore, many of the indexes created by a fair use
implementation of TPC-C for Postgres are consistently about 40% smaller
when the optimization is available.

Note that even pg_upgrade'd v3 indexes make use of this optimization.

Author: Peter Geoghegan
Reviewed-By: Heikki Linnakangas
Discussion: https://postgr.es/m/CAH2-WzkpKeZJrXvR_p7VSY1b-s85E3gHyTbZQzR0BkJ5LrWF_A@mail.gmail.com
2019-03-25 09:44:25 -07:00
..
backend Add "split after new tuple" nbtree optimization. 2019-03-25 09:44:25 -07:00
bin Refactor code to print pgbench progress reports. 2019-03-25 18:07:29 +02:00
common Refactor more code logic to update the control file 2019-03-18 12:59:35 +09:00
fe_utils pgbench: Remove \cset 2019-03-25 12:16:07 -03:00
include pgbench: Remove \cset 2019-03-25 12:16:07 -03:00
interfaces Restructure libpq's handling of send failures. 2019-03-19 16:20:28 -04:00
makefiles
pl Transaction chaining 2019-03-24 11:33:02 +01:00
port Fix error handling of readdir() port implementation on first file lookup 2019-03-04 09:49:06 +09:00
template
test Further code review for new integerset code. 2019-03-25 12:23:48 -04:00
timezone
tools tableam: Add tuple_{insert, delete, update, lock} and use. 2019-03-23 19:55:57 -07:00
tutorial
.gitignore
DEVELOPERS
Makefile
Makefile.global.in Revert attempts to use POPCNT etc instructions 2019-02-15 16:32:30 -03:00
Makefile.shlib
nls-global.mk