[PERFORM] Custom function in where clause

2012-07-10 Thread Pena Kupen
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. My sql is: select count(*) from table_h where level = get_level_value(11268,id,area) and (date1 =

Re: [PERFORM] Custom function in where clause

2012-07-10 Thread Pena Kupen
Hi and thank's guys! First trying this Brendan's recommendation. It seems only a small difference between sql and PL/pgSQL. from 40--37. Not so good yet. I will try Maxim's little later and you all know. -- kupen Brendan Jurd [dire...@gmail.com] kirjoitti: On 10 July 2012 18:36, Pena Kupen

Fw: Re: [PERFORM] Custom function in where clause

2012-07-10 Thread Pena Kupen
/s, maybe that or am I missing something? -- kupen Maxim Boguk [maxim.bo...@gmail.com] kirjoitti: On Tue, Jul 10, 2012 at 6:36 PM, Pena Kupen ku...@wippies.fi wrote: Hi, I have searched solution to my problem a few days. On my query, there is big performance problem. It seems to me