Re: slow cursor

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Sriram Dandapani <sdandapani(at)counterpane(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: slow cursor
Date: 2006-04-21 02:35:40
Message-ID: 20060421023540.GS49405@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Mon, Apr 17, 2006 at 07:07:54AM -0700, Sriram Dandapani wrote:
> 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

Not likely. Are you at least doing all this inside a transaction?
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

  • slow cursor at 2006-04-17 14:07:54 from Sriram Dandapani

Browse pgsql-admin by date

  From Date Subject
Next Message Jim C. Nasby 2006-04-21 02:57:44 Re: Invalid Page Headers
Previous Message Jim C. Nasby 2006-04-21 01:42:43 Re: Slony1 or DRBD for replication ?