postgresql/src/tools
Andres Freund 69c3936a14 Expression evaluation based aggregate transition invocation.
Previously aggregate transition and combination functions were invoked
by special case code in nodeAgg.c, evaluating input and filters
separately using the expression evaluation machinery. That turns out
to not be great for performance for several reasons:

- repeated expression evaluations have some cost
- the transition functions invocations are poorly predicted, as
  commonly there are multiple aggregates in a query, resulting in the
  same call-stack invoking different functions.
- filter and input computation had to be done separately
- the special case code made it hard to implement JITing of the whole
  transition function invocation

Address this by building one large expression that computes input,
evaluates filters, and invokes transition functions.

This leads to moderate speedups in queries bottlenecked by aggregate
computations, and enables large speedups for similar cases once JITing
is done.

There's potential for further improvement:
- It'd be nice if we could simplify the somewhat expensive
  aggstate->all_pergroups lookups.
- right now there's still an advance_transition_function invocation in
  nodeAgg.c, leading to some code duplication.

Author: Andres Freund
Discussion: https://postgr.es/m/20170901064131.tazjxwus3k2w3ybh@alap3.anarazel.de
2018-01-09 13:25:38 -08:00
..
editors emacs: Set indent-tabs-mode in perl-mode 2015-04-12 23:53:23 -04:00
findoidjoins Update copyright for 2018 2018-01-02 23:30:12 -05:00
ifaddrs Update copyright for 2018 2018-01-02 23:30:12 -05:00
make_diff
msvc Fix use of config-specific libraries for Windows OpenSSL 2018-01-03 15:36:54 -05:00
pginclude Clean up Perl code according to perlcritic 2017-03-27 08:18:22 -04:00
pgindent Expression evaluation based aggregate transition invocation. 2018-01-09 13:25:38 -08:00
ccsym
check_bison_recursion.pl Update copyright for 2018 2018-01-02 23:30:12 -05:00
codelines
copyright.pl Update copyright for 2018 2018-01-02 23:30:12 -05:00
FAQ2txt
find_badmacros
find_static Fix omission of -X (--no-psqlrc) in some psql invocations. 2015-12-28 11:46:43 -05:00
find_typedef Refer to OS X as "macOS", except for the port name which is still "darwin". 2016-09-25 15:40:57 -04:00
fix-old-flex-code.pl Update copyright for 2018 2018-01-02 23:30:12 -05:00
git_changelog Adjust git_changelog for new-style release tags. 2017-10-04 00:45:15 -04:00
git-external-diff
make_ctags
make_etags
make_mkid
pgtest
RELEASE_CHANGES Update RELEASE_CHANGES' example of branch name format. 2017-08-06 23:26:09 -04:00
testint128.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
valgrind.supp Copyedit comments and documentation. 2016-04-01 21:53:10 -04:00
version_stamp.pl Update copyright for 2018 2018-01-02 23:30:12 -05:00
win32tzlist.pl Update copyright for 2018 2018-01-02 23:30:12 -05:00