Re: [PERFORM] Queries within a function

2010-02-03 Thread Mridula Mahadevan
: Віталій Тимчишин [mailto:tiv...@gmail.com] Sent: Wednesday, February 03, 2010 8:11 AM To: Mridula Mahadevan Cc: pgsql-performance@postgresql.org Subject: Re: [PERFORM] Queries within a function 2010/2/2 Mridula Mahadevan mailto:mmahade...@stratify.com>> Hi, I am running a bunch of q

Re: [PERFORM] Queries within a function

2010-02-03 Thread Віталій Тимчишин
2010/2/2 Mridula Mahadevan > Hi, > > I am running a bunch of queries within a function, creating some temp > tables and populating them. When the data exceeds say, 100k the queries > start getting really slow and timeout (30 min). when these are run outside > of a transaction(in auto commit mod

Re: [PERFORM] Queries within a function

2010-02-02 Thread ramasubramanian
Hi, Try using dynamic sql. Query will be faster in a function regards Ram - Original Message - From: "Mridula Mahadevan" To: "Tom Lane" Cc: Sent: Wednesday, February 03, 2010 2:23 AM Subject: Re: [PERFORM] Queries within a function Tom, I cannot run execute b

Re: [PERFORM] Queries within a function

2010-02-02 Thread Mridula Mahadevan
Message- From: Tom Lane [mailto:t...@sss.pgh.pa.us] Sent: Tuesday, February 02, 2010 11:28 AM To: Mridula Mahadevan Cc: pgsql-performance@postgresql.org Subject: Re: [PERFORM] Queries within a function Mridula Mahadevan writes: > I am running a bunch of queries within a function, creating s

Re: [PERFORM] Queries within a function

2010-02-02 Thread Mridula Mahadevan
clauses -Original Message- From: "Ing. Marcos Ortiz Valmaseda" [mailto:mlor...@uci.cu] Sent: Tuesday, February 02, 2010 11:59 AM To: Mridula Mahadevan Cc: pgsql-performance@postgresql.org Subject: Re: [PERFORM] Queries within a function Mridula Mahadevan wrote: > > Hi, &g

Re: [PERFORM] Queries within a function

2010-02-02 Thread Ing. Marcos Orti­z Valmaseda
Mridula Mahadevan wrote: Hi, I am running a bunch of queries within a function, creating some temp tables and populating them. When the data exceeds say, 100k the queries start getting really slow and timeout (30 min). when these are run outside of a transaction(in auto commit mode), they r

Re: [PERFORM] Queries within a function

2010-02-02 Thread Tom Lane
Mridula Mahadevan writes: > I am running a bunch of queries within a function, creating some temp tables > and populating them. When the data exceeds say, 100k the queries start > getting really slow and timeout (30 min). when these are run outside of a > transaction(in auto commit mode), they

Re: [PERFORM] Queries within a function

2010-02-02 Thread Pavel Stehule
Hello look on http://blog.endpoint.com/2008/12/why-is-my-function-slow.html Regards Pavel Stehule 2010/2/2 Mridula Mahadevan : > Hi, > >  I am running a bunch of queries within a function, creating some temp > tables and populating them. When the data exceeds say, 100k the queries > start gettin

[PERFORM] Queries within a function

2010-02-02 Thread Mridula Mahadevan
Hi, I am running a bunch of queries within a function, creating some temp tables and populating them. When the data exceeds say, 100k the queries start getting really slow and timeout (30 min). when these are run outside of a transaction(in auto commit mode), they run in a few seconds. Any idea