Skip site navigation (1) Skip section navigation (2)

Re: Replacing Cursors with Temporary Tables

From: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: Eliot Gable <egable+pgsql-performance(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Replacing Cursors with Temporary Tables
Date: 2010-04-24 14:38:02
Message-ID: p2k2f4958ff1004240738i91f8b5eco8b4571f994e15254@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-performance
On Sat, Apr 24, 2010 at 2:23 PM, Merlin Moncure <mmoncure(at)gmail(dot)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

In response to

Responses

pgsql-performance by date

Next:From: Merlin MoncureDate: 2010-04-24 15:20:12
Subject: Re: Replacing Cursors with Temporary Tables
Previous:From: Merlin MoncureDate: 2010-04-24 13:23:40
Subject: Re: Replacing Cursors with Temporary Tables

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group