|From:||Marina Polyakova <m(dot)polyakova(at)postgrespro(dot)ru>|
|Cc:||Aleksander Alekseev <a(dot)alekseev(at)postgrespro(dot)ru>, Andres Freund <andres(at)anarazel(dot)de>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>|
|Subject:||Re: [HACKERS] WIP Patch: Precalculate stable functions, infrastructure v1|
|Views:||Raw Message | Whole Thread | Download mbox|
First of all, happy New Year!
Secondly, here there's a sixth version of the patch for the
precalculation of stable or immutable functions, stable or immutable
operators and other nonvolatile expressions.
The basic idea: the expression is precalculated (= calculated once for
all output rows, but as many times as the expression is mentioned in the
1) it doesn't return a set,
2) it's not volatile itself,
3) its arguments are also constants or precalculated expressions.
Differences from the previous version:
* rebased, including changes for ArrayCoerce expressions;
* support for prepared statements (including tests, but only for
* fix the caching of SQLValueFunctions (all of them are stable even
* added the expected output for the tests in case the xml functions are
* the tests are also performed in make check, not just in make
* code cleanup.
Like for the previous patches it seems that there is no obvious
performance degradation too on regular queries (according to pgbench).
> pgbench probably isn't a very good test for this sort of thing - it
> only issues very short-running queries where the cost of evaluating
> expressions is a relatively small part of the total cost. Even if
> things get worse, I'm not sure if you'd see it. I'm not sure exactly
> how you could construct a test case that could be harmed by this patch
> - I guess you'd want to initialize lots of CacheExprs but never make
> use of the caching usefully?
> It could also be useful to test things like TPC-H to see if you get an
I'm sorry, the TPC-H comparative tests will be later..
Patch is attached. Any suggestions are welcome!
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
|Next Message||Masahiko Sawada||2017-12-31 06:15:27||Re: [HACKERS] Commits don't block for synchronous replication|
|Previous Message||Tom Lane||2017-12-31 00:00:19||Re: pgsql: Add parallel-aware hash joins.|