Re: Replacing Cursors with Temporary Tables - Mailing list pgsql-performance

From Grzegorz Jaśkiewicz
Subject Re: Replacing Cursors with Temporary Tables
Date
Msg-id p2k2f4958ff1004240738i91f8b5eco8b4571f994e15254@mail.gmail.com
Whole thread Raw
In response to Re: Replacing Cursors with Temporary Tables  (Merlin Moncure <mmoncure@gmail.com>)
Responses Re: Replacing Cursors with Temporary Tables  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-performance


On Sat, Apr 24, 2010 at 2:23 PM, Merlin Moncure <mmoncure@gmail.com> wrote:

Well, you missed the most important part: not using cursors at all.
Instead of declaring a cursor and looping it to build the array, build
it with array().  That's what I've been saying: arrays can completely
displace both temp tables _and_ cursors when passing small sets around
functions.

with huge emphasis on the word small.


--
GJ

pgsql-performance by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: Replacing Cursors with Temporary Tables
Next
From: Merlin Moncure
Date:
Subject: Re: Replacing Cursors with Temporary Tables