postgresql/src/include
Tom Lane 69c8fbac20 Improve performance of numeric sum(), avg(), stddev(), variance(), etc.
This patch improves performance of most built-in aggregates that formerly
used a NUMERIC or NUMERIC array as their transition type; this includes
not only aggregates on numeric inputs, but some aggregates on integer
inputs where overflow of an int8 value is a possibility.  The code now
uses a special-purpose data structure to avoid array construction and
deconstruction overhead, as well as packing and unpacking overhead for
numeric values.

These aggregates' transition type is now declared as INTERNAL, since
it doesn't correspond to any SQL data type.  To keep the planner from
thinking that that means a lot of storage will be used, we make use
of the just-added pg_aggregate.aggtransspace feature.  The space estimate
is set to 128 bytes, which is at least in the right ballpark.

Hadi Moshayedi, reviewed by Pavel Stehule and Tomas Vondra
2013-11-16 18:46:34 -05:00
..
access Fix race condition in GIN posting tree page deletion. 2013-11-08 22:21:42 +02:00
bootstrap Update copyrights for 2013 2013-01-01 17:15:01 -05:00
catalog Improve performance of numeric sum(), avg(), stddev(), variance(), etc. 2013-11-16 18:46:34 -05:00
commands Allow aggregates to provide estimates of their transition state data size. 2013-11-16 16:03:40 -05:00
common Replace pg_asprintf() with psprintf(). 2013-10-22 19:40:26 -04:00
datatype Update copyrights for 2013 2013-01-01 17:15:01 -05:00
executor Prevent leakage of SPI tuple tables during subtransaction abort. 2013-07-25 16:46:14 -04:00
foreign Improve updatability checking for views and foreign tables. 2013-06-12 17:53:33 -04:00
lib Use improved vsnprintf calling logic in more places. 2013-10-24 21:43:57 -04:00
libpq Add large object functions catering to SQL callers. 2013-10-27 22:56:54 -04:00
mb Renovate display of non-ASCII messages on Windows. 2013-06-26 11:17:33 -04:00
nodes Compute correct em_nullable_relids in get_eclass_for_sort_expr(). 2013-11-15 16:46:18 -05:00
optimizer Compute correct em_nullable_relids in get_eclass_for_sort_expr(). 2013-11-15 16:46:18 -05:00
parser Allow aggregate functions to be VARIADIC. 2013-09-03 17:08:46 -04:00
port Get rid of use of asprintf() in favor of a more portable implementation. 2013-10-22 18:42:13 -04:00
portability Allow dynamic allocation of shared memory segments. 2013-10-09 21:05:02 -04:00
postmaster Provide a reliable mechanism for terminating a background worker. 2013-10-18 10:23:11 -04:00
regex Fix old typo in comment. 2013-10-29 15:34:18 -04:00
replication pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
rewrite Allow only some columns of a view to be auto-updateable. 2013-10-18 10:35:36 -04:00
snowball Update copyrights for 2013 2013-01-01 17:15:01 -05:00
storage Modify dynamic shared memory code to use Size rather than uint64. 2013-10-28 12:12:06 -04:00
tcop pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
tsearch Update copyrights for 2013 2013-01-01 17:15:01 -05:00
utils Improve performance of numeric sum(), avg(), stddev(), variance(), etc. 2013-11-16 18:46:34 -05:00
.gitignore Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
c.h Consistently use unsigned arithmetic for alignment calculations. 2013-10-20 21:04:52 -04:00
fmgr.h Add infrastructure for storing a VARIADIC ANY function's VARIADIC flag. 2013-01-21 20:26:15 -05:00
funcapi.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
getaddrinfo.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
getopt_long.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
Makefile Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
miscadmin.h Remove CTimeZone/HasCTZSet, root and branch. 2013-11-01 13:57:31 -04:00
pg_config.h.in Get rid of use of asprintf() in favor of a more portable implementation. 2013-10-22 18:42:13 -04:00
pg_config.h.win32 Revert WAL posix_fallocate() patches. 2013-09-04 23:43:41 -07:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_ext.h.win32 Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_manual.h Keep heavily-contended fields in XLogCtlInsert on different cache lines. 2013-09-04 23:14:33 +03:00
pg_trace.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pgstat.h Split pgstat file in smaller pieces 2013-02-18 18:12:52 -03:00
pgtar.h Move tar function headers to pgtar.h 2013-01-02 20:34:08 +01:00
pgtime.h Fix some odd behaviors when using a SQL-style simple GMT offset timezone. 2013-11-01 12:13:18 -04:00
port.h Get rid of use of asprintf() in favor of a more portable implementation. 2013-10-22 18:42:13 -04:00
postgres.h Add comment for VARSIZE_ANY_EXHDR macro 2013-09-10 20:18:53 -04:00
postgres_ext.h Provide database object names as separate fields in error messages. 2013-01-29 17:08:26 -05:00
postgres_fe.h Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
rusagestub.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
windowapi.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00