Re: [PERFORM] Slow cursor

2011-10-26 Thread Andres Freund
Hi, On Wednesday 26 Oct 2011 14:43:08 Cezariusz Marek wrote: > Is there any known problem with slow cursors in PostgreSQL 8.4.5? > > I have a following query, which is slow (on my database it takes 11 seconds > to execute), probably should be rewritten, but it doesn't matter here. The > problem i

Re: [PERFORM] Slow cursor

2011-10-26 Thread Cezariusz Marek
Gregg Jaskiewicz wrote: > Do you really need to query the catalogues ? That on its own is not a > good idea if you want something to run fast and frequently. I know, but I've used it just to show the problem with cursors. I have the same problem with other slow queries, which execute within x sec

Re: [PERFORM] Slow cursor

2011-10-26 Thread Gregg Jaskiewicz
Do you really need to query the catalogues ? That on its own is not a good idea if you want something to run fast and frequently. -- GJ -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-p

Re: [PERFORM] slow cursor

2006-04-17 Thread Luckys
This is one thing that I always try to avoid, a single INSERT INTO...SELECT ...FROM or single UPDATE is always faster compared to looping the same within a cursor, unless its inevitable.   regards, Luckys.  On 4/17/06, Sriram Dandapani <[EMAIL PROTECTED]> wrote: Hi   I have a cursor that fetches