Re: [PERFORM] Custom function in where clause

2012-07-10 Thread Brendan Jurd
On 10 July 2012 18:36, Pena Kupen wrote: > Hi, > > I have searched solution to my problem a few days. On my query, there is big > performance problem. > It seems to me, that problem is on where-part of sql and it's function. > > How should I handle this situation and use function? > I would star

Re: [PERFORM] Constraint exclusion can't process simple constant expressions?

2011-04-20 Thread Brendan Jurd
On 21 April 2011 12:13, Josh Berkus wrote: >> Emphasis on "always".  If the result of the function, given the same >> argument values, can be different after a SET, then it doesn't qualify >> for immutability.  At least, that's my understanding. > > H.  But within the context of the query plan

Re: [PERFORM] Constraint exclusion can't process simple constant expressions?

2011-04-20 Thread Brendan Jurd
On 21 April 2011 11:58, Josh Berkus wrote: >> timestamptz + interval is not immutable --- in fact, the particular >> example you give (ts + '1 day') is certainly dependent on timezone >> setting. > > Why not?  Given that the time zone will be the same for both the > timestamptz and the interval, h