postgresql/src
Tom Lane 6730685886 Improve inheritance_planner()'s performance for large inheritance sets.
Commit c03ad5602f introduced a planner
performance regression for UPDATE/DELETE on large inheritance sets.
It required copying the append_rel_list (which is of size proportional to
the number of inherited tables) once for each inherited table, thus
resulting in O(N^2) time and memory consumption.  While it's difficult to
avoid that in general, the extra work only has to be done for
append_rel_list entries that actually reference subquery RTEs, which
inheritance-set entries will not.  So we can buy back essentially all of
the loss in cases without subqueries in FROM; and even for those, the added
work is mainly proportional to the number of UNION ALL subqueries.

Back-patch to 9.2, like the previous commit.

Tom Lane and Dean Rasheed, per a complaint from Thomas Munro.
2015-06-22 18:53:27 -04:00
..
backend Improve inheritance_planner()'s performance for large inheritance sets. 2015-06-22 18:53:27 -04:00
bin initdb -S should now have an explicit check that $PGDATA is valid. 2015-05-29 17:02:58 -04:00
common Unlink static libraries before rebuilding them. 2015-03-01 13:06:39 -05:00
include Stamp 9.3.9. 2015-06-09 15:31:32 -04:00
interfaces Check for out of memory when allocating sqlca. 2015-06-15 14:22:54 +02:00
makefiles Don't use deprecated dllwrap on Cygwin. 2014-02-01 16:13:32 -05:00
pl Revert error-throwing wrappers for the printf family of functions. 2015-05-19 18:16:58 -04:00
port Truncate strings in tarCreateHeader() with strlcpy(), not sprintf(). 2015-06-21 20:05:11 -04:00
template Remove _FORTIFY_SOURCE 2012-10-10 21:42:38 -04:00
test Improve error message and hint for ALTER COLUMN TYPE can't-cast failure. 2015-06-12 11:54:03 -04:00
timezone Update time zone data files to tzdata release 2015d. 2015-05-15 19:35:58 -04:00
tools Revert error-throwing wrappers for the printf family of functions. 2015-05-19 18:16:58 -04:00
tutorial Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
Makefile.global.in Revert "Backpatch pgxs vpath build and installation fixes." 2013-10-07 22:32:04 -04:00
Makefile.shlib Unlink static libraries before rebuilding them. 2015-03-01 13:06:39 -05:00
nls-global.mk NLS: Use msgmerge --previous option 2012-12-13 23:12:12 -05:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00