slow cursor

From: "Sriram Dandapani" <sdandapani(at)counterpane(dot)com>
To: "Pgsql-Performance \(E-mail\)" <pgsql-performance(at)postgresql(dot)org>
Subject: slow cursor
Date: 2006-04-17 14:34:38
Message-ID: 6992E470F12A444BB787B5C937B9D4DF0406A546@ca-mail1.cis.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi

I have a cursor that fetches 150K rows and updates or inserts a table
with 150K rows.

It takes several minutes for the process to complete (about 15 minutes).
The select by itself (without cursor) gets all rows in 15 seconds.

Is there a way to optimize the cursor to fetch all records and speed up
the process. I still need to do the record by record processing

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Sriram Dandapani 2006-04-17 18:36:32 creating of temporary table takes very long
Previous Message Tom Lane 2006-04-17 01:35:50 Re: Migration study, step 2: rewriting queries