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 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. Instead of: WHERE fo

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

2012-10-30 Thread Josh Berkus
Marti, > Sadly some other things intervened and I have not had the time to > return to hacking on this patch. But I am hopeful I can get it into > shape during the 9.3 cycle. Hey, are you going to work on this for 9.3? I really could use the feature ... -- Josh Berkus PostgreSQL Experts Inc. h

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 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 thorou

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 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: http://archives.postgresql.org/pgsql-hackers/2012

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

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

2012-03-10 Thread Tom Lane
Marti Raudsepp writes: > On Sat, Mar 10, 2012 at 02:05, Tom Lane 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 >> insert_cache itself, but th

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 wrote: > Marti Raudsepp 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 try to wrap a plain vanilla >

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

2012-03-09 Thread Tom Lane
Marti Raudsepp 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 as well if the

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 wrote: > On Sat, Feb 4, 2012 at 09:49, Jaime Casanova 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 information schema ... TRAP: Faile

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 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 > generate_series(

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 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 numeric as

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 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 (pgsql-hackers@postgresql.org) To ma

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 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 since last

[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" branc