On Mon, Sep 12, 2011 at 00:22, Tom Lane t...@sss.pgh.pa.us wrote:
The other thing that is going to be an issue is that I'm fairly sure
this breaks plpgsql's handling of simple expressions.
The quick and dirty solution to this would be for plpgsql to pass some
kind of planner flag that
On Mon, Sep 12, 2011 at 00:22, Tom Lane t...@sss.pgh.pa.us wrote:
Well, people seem to think that this is worth pursuing, so here's a
couple of thoughts about what needs to be done to get to something
committable.
Thanks, that's exactly the kind of feedback I need.
IMO this is no good
Marti Raudsepp ma...@juffo.org writes:
On Mon, Sep 12, 2011 at 00:22, Tom Lane t...@sss.pgh.pa.us wrote:
type CacheExpr (that's just the first name that came to mind, maybe
somebody has a better idea)
StableConstExpr? But we can leave the bikeshedding for later :)
Well, FWIW, I found that
Marti Raudsepp ma...@juffo.org writes:
On Sun, Sep 11, 2011 at 01:51, Tom Lane t...@sss.pgh.pa.us wrote:
The patch as given has a bunch of implementation issues
This is my first patch that touches the more complicated internals of
Postgres. I'm sure I have a lot to learn. :)
Well, people
Hi,
This is a proof of concept patch for recognizing stable function calls
with constant arguments and only calling them once per execution. I'm
posting it to the list to gather feedback whether this is a dead end
or not.
Last time when this was brought up on the list, Tom Lane commented
that
Marti Raudsepp ma...@juffo.org writes:
This is a proof of concept patch for recognizing stable function calls
with constant arguments and only calling them once per execution. I'm
posting it to the list to gather feedback whether this is a dead end
or not.
Hmm. This is an interesting hack,
The patch as given has a bunch of implementation issues, but I think
it's close enough for crude performance testing, and your numbers do
show a potential performance benefit. The question that I think is
unresolved is whether the set of cases covered is wide enough to be
useful in
If I understand the limitations correctly, though, what this would do is
cause functions to perform substantially differently if called with
expressions as arguments instead of text constants, no? Seems like that
would lead to some user confusion. Although, with stuff like now(), we
On Sun, Sep 11, 2011 at 01:51, Tom Lane t...@sss.pgh.pa.us wrote:
Usually what people have meant when they ask for function caching
is that multiple executions of a given stable function with the same
argument values be folded to just one execution. In the general case
that would require some