Re: [PERFORM] tricky query

2005-06-29 Thread Dawid Kuroczko
On 6/28/05, John A Meinel [EMAIL PROTECTED] wrote: Actually, if you already have a lower bound, then you can change it to: SELECT t1.id+1 as id_new FROM id_test t1 WHERE t1.id id_min AND NOT EXISTS (SELECT t2.id FROM id_test t2 WHERE t2.id = t1.id+1) ORDER BY

Re: [PERFORM] Postgresql7.4.5 running slow on plpgsql function

2005-06-29 Thread Michael Fuhr
[Please copy the mailing list on replies so others can contribute to and learn from the discussion.] On Wed, Jun 29, 2005 at 12:29:42PM +0800, Chun Yit(Chronos) wrote: Yes, the function will delete records from the temporary table every time on each call. if leaving a lot of dead tuples,

[PERFORM] Exclusive lock question

2005-06-29 Thread Emil Briggs
I have been trying to diagnose a performance problem we have been seeing with a postgres application. The performance of the database server is usually quite good but every now and then it slows to a crawl. The output of vmstat does not show excessive CPU usage or disk IO. The output of ps