Hello, hackers!
Here I have made the 5th version of the patches. I have added the
precalculation of all primitive nodes that don't return set, are not
volatile themselves and their arguments are constant or precalculated
expressions too. There're regression tests for all of them and little
notes in the documentation. Like for the previous patches it seems that
there is no obvious performance degradation too on regular queries
(according to pgbench).
About functionality: precalculation doesn't work for parameters nodes in
plan. So it doesn't work, for example, in the generic plans of prepared
statements. There'll be an another patch for them.
About code:
* Infrastructure patch changes: no enum and union for all 25
precalculated node types. Instead of them there is a new CacheableExpr
node which only contains a NodeTag.
* There're some changes for CoerceToDomain, which constraints now are
checked not only in the executor but in the planner too.
Patches are attached. Any suggestions are welcome!
--
Marina Polyakova
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
--
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers