pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Grzegorz Jaśkiewicz <gryzman@gmail.com>
To: Merlin Moncure <mmoncure@gmail.com>
Cc: Eliot Gable <egable+pgsql-performance@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Replacing Cursors with Temporary Tables
Date: Sat, 24 Apr 2010 15:38:02 +0100
Message-ID: <p2k2f4958ff1004240738i91f8b5eco8b4571f994e15254@mail.gmail.com> (raw)
In-Reply-To: <s2lb42b73151004240623h78726052h4f30fade77f8b572@mail.gmail.com>
References: <n2ybf6923ed1004211316ib844d82bn7a63bd3292ca80a0@mail.gmail.com>
	<n2sb42b73151004220711mc2135db6heccf53ec1fb0136e@mail.gmail.com>
	<q2yb42b73151004220742gbb7ae4adyc3781cedf98e8559@mail.gmail.com>
	<m2gbf6923ed1004221357ua9ab54a3s92dfdbb59cfef832@mail.gmail.com>
	<n2qbf6923ed1004231342l61f766fax8fb2a482aa3b0faf@mail.gmail.com>
	<r2wb42b73151004231401r120510e8ne5ece4cdda768d5a@mail.gmail.com>
	<x2kbf6923ed1004231739qe92d06c2o557d4e31e66ba3d7@mail.gmail.com>
	<v2ybf6923ed1004231931gc02a4368wa00bbc0fdf8d4543@mail.gmail.com>
	<s2lb42b73151004240623h78726052h4f30fade77f8b572@mail.gmail.com>

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

view thread (17+ messages)  latest in thread

Message-ID: <p2k2f4958ff1004240738i91f8b5eco8b4571f994e15254@mail.gmail.com>
Permalink:  ../p2k2f4958ff1004240738i91f8b5eco8b4571f994e15254@mail.gmail.com/
Also on:    postgresql.org/message-id/p2k2f4958ff1004240738i91f8b5eco8b4571f994e15254@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: gryzman@gmail.com, mmoncure@gmail.com, egable+pgsql-performance@gmail.com
  Subject: Re: Replacing Cursors with Temporary Tables
  In-Reply-To: <p2k2f4958ff1004240738i91f8b5eco8b4571f994e15254@mail.gmail.com>
  References: <n2ybf6923ed1004211316ib844d82bn7a63bd3292ca80a0@mail.gmail.com> <n2sb42b73151004220711mc2135db6heccf53ec1fb0136e@mail.gmail.com> <q2yb42b73151004220742gbb7ae4adyc3781cedf98e8559@mail.gmail.com> <m2gbf6923ed1004221357ua9ab54a3s92dfdbb59cfef832@mail.gmail.com> <n2qbf6923ed1004231342l61f766fax8fb2a482aa3b0faf@mail.gmail.com> <r2wb42b73151004231401r120510e8ne5ece4cdda768d5a@mail.gmail.com> <x2kbf6923ed1004231739qe92d06c2o557d4e31e66ba3d7@mail.gmail.com> <v2ybf6923ed1004231931gc02a4368wa00bbc0fdf8d4543@mail.gmail.com> <s2lb42b73151004240623h78726052h4f30fade77f8b572@mail.gmail.com> <p2k2f4958ff1004240738i91f8b5eco8b4571f994e15254@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox