Re: [HACKERS] Caching for stable expressions with constant arguments v6

2012-10-31 Thread Marti Raudsepp
On Wed, Oct 31, 2012 at 2:21 AM, Josh Berkus j...@agliodbs.com wrote: Hey, are you going to work on this for 9.3? Yes, I do plan to get back to it. Thanks for the push :) I really could use the feature ... If you're not aware already, you can work around the limitation using a subquery.

Re: [HACKERS] Caching for stable expressions with constant arguments v6

2012-08-27 Thread Bruce Momjian
Where are we on this? --- On Mon, Jan 16, 2012 at 07:06:45PM +0200, Marti Raudsepp wrote: Hi list, Here's v6 of my expression caching patch. The only change in v6 is added expression cost estimation in costsize.c. I'm

Re: [HACKERS] Caching for stable expressions with constant arguments v6

2012-08-27 Thread Marti Raudsepp
On Mon, Aug 27, 2012 at 4:50 PM, Bruce Momjian br...@momjian.us wrote: Where are we on this? TL;DR: Got a review, requires substantial work, current github branch is slightly broken, will get back to this soon. Tom Lane sent a thorough review of the patch here:

Re: [HACKERS] Caching for stable expressions with constant arguments v6

2012-08-27 Thread Bruce Momjian
On Mon, Aug 27, 2012 at 05:44:32PM +0300, Marti Raudsepp wrote: On Mon, Aug 27, 2012 at 4:50 PM, Bruce Momjian br...@momjian.us wrote: Where are we on this? TL;DR: Got a review, requires substantial work, current github branch is slightly broken, will get back to this soon. Tom Lane sent

Re: [HACKERS] Caching for stable expressions with constant arguments v6

2012-03-10 Thread Marti Raudsepp
On Sat, Mar 10, 2012 at 02:05, Tom Lane t...@sss.pgh.pa.us wrote: Marti Raudsepp ma...@juffo.org writes: [ cacheexpr-v8.patch ] A few comments Whoa, that's quite a few. Thanks for the review. * There's a lot of stuff that seems wrong in detail in eval_const_expressions_mutator, eg it'll

Re: [HACKERS] Caching for stable expressions with constant arguments v6

2012-03-10 Thread Tom Lane
Marti Raudsepp ma...@juffo.org writes: On Sat, Mar 10, 2012 at 02:05, Tom Lane t...@sss.pgh.pa.us wrote: * There's a lot of stuff that seems wrong in detail in eval_const_expressions_mutator, eg it'll try to wrap a plain vanilla Const with a CacheExpr. I see you've hacked that case inside

Re: [HACKERS] Caching for stable expressions with constant arguments v6

2012-03-09 Thread Tom Lane
Marti Raudsepp ma...@juffo.org writes: [ cacheexpr-v8.patch ] A few comments: * I believe the unconditional datumCopy call in ExecEvalCacheExpr will dump core if the value is null and the type is pass-by-reference. Beyond just skipping it, it seems like you could skip the type properties lookup

Re: [HACKERS] Caching for stable expressions with constant arguments v6

2012-03-01 Thread Jaime Casanova
On Sat, Feb 4, 2012 at 5:40 AM, Marti Raudsepp ma...@juffo.org wrote: On Sat, Feb 4, 2012 at 09:49, Jaime Casanova ja...@2ndquadrant.com wrote: i little review... Thanks! By the way, you should update to the v7 patch. just tried it and it fail when initializing on make check creating

Re: [HACKERS] Caching for stable expressions with constant arguments v6

2012-02-04 Thread Marti Raudsepp
On Sat, Feb 4, 2012 at 09:49, Jaime Casanova ja...@2ndquadrant.com wrote: i little review... Thanks! By the way, you should update to the v7 patch. first, i notice a change of behaviour... i'm not sure if i can say this is good or not. if you execute: select *, cached_random() from (select

Re: [HACKERS] Caching for stable expressions with constant arguments v6

2012-02-03 Thread Jaime Casanova
On Mon, Jan 16, 2012 at 12:06 PM, Marti Raudsepp ma...@juffo.org wrote: Here's v6 of my expression caching patch. i little review... first, i notice a change of behaviour... i'm not sure if i can say this is good or not. with this function: create or replace function cached_random() returns

Re: [HACKERS] Caching for stable expressions with constant arguments v6

2012-01-27 Thread Robert Haas
On Mon, Jan 16, 2012 at 12:06 PM, Marti Raudsepp ma...@juffo.org wrote: Here's v6 of my expression caching patch. The patch is not attached. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list

[HACKERS] Caching for stable expressions with constant arguments v6

2012-01-16 Thread Marti Raudsepp
Hi list, Here's v6 of my expression caching patch. The only change in v6 is added expression cost estimation in costsize.c. I'm setting per-tuple cost of CacheExpr to 0 and moving sub-expression tuple costs into the startup cost. As always, this work is also available from my Github cache

Re: [HACKERS] Caching for stable expressions with constant arguments v6

2012-01-16 Thread Jaime Casanova
On Mon, Jan 16, 2012 at 12:06 PM, Marti Raudsepp ma...@juffo.org wrote: I will add it to the 2012-01 commitfest now, I hope that's OK. If not, feel free to remove it and I'll put it in 2012-Next. i'm not the CF manager so he can disagree with me... but IMHO your patch has been almost complete