Re: Function performance degrades after repeated execution

2019-11-16 Thread Pavel Stehule
so 16. 11. 2019 v 16:46 odesílatel Ron napsal: > On 11/16/19 8:22 AM, Dave Roberge wrote: > > Hi, > > > > We've been troubleshooting a slow running function in our postgres > database. I've been able to boil it down to the simplest function possible. > It looks like this: > > > > FOR rec IN selec

Re: Function performance degrades after repeated execution

2019-11-16 Thread Ron
On 11/16/19 8:22 AM, Dave Roberge wrote: Hi, We've been troubleshooting a slow running function in our postgres database. I've been able to boil it down to the simplest function possible. It looks like this: FOR rec IN select 1 as matchval FROM table1 t1, table2 t2 join table3 t3 on t3.col

Re: Function performance degrades after repeated execution

2019-11-16 Thread Pavel Stehule
so 16. 11. 2019 v 16:06 odesílatel Dave Roberge napsal: > Hi, > > We've been troubleshooting a slow running function in our postgres > database. I've been able to boil it down to the simplest function possible. > It looks like this: > > FOR rec IN select 1 as matchval FROM table1 t1, table2 t2 >

Function performance degrades after repeated execution

2019-11-16 Thread Dave Roberge
Hi, We've been troubleshooting a slow running function in our postgres database. I've been able to boil it down to the simplest function possible. It looks like this: FOR rec IN select 1 as matchval FROM table1 t1, table2 t2 join table3 t3 on t3.col = t2.col WHERE t1.col = id LOOP IF rec.