Re: join from array or cursor - Mailing list pgsql-general

From Greg Stark
Subject Re: join from array or cursor
Date
Msg-id 407d949e0908221936u232b48e9pd68fe89a666ef0d9@mail.gmail.com
Whole thread Raw
In response to Re: join from array or cursor  (John DeSoi <desoi@pgedit.com>)
List pgsql-general
On Sun, Aug 23, 2009 at 1:30 AM, John DeSoi<desoi@pgedit.com> wrote:
> While it avoids the sort of my method, it appears to be almost 5 times
> slower (about 4000 keys in the cursor, Postgres 8.4.0):
>
>
> Function Scan on cursor_pk arr  (cost=0.00..116011.72 rows=1000 width=4)
> (actual time=13.561..249.916 rows=4308 loops=1)
>  SubPlan 1
>  SubPlan 2
>  SubPlan 3
>  ...

Ugh, I guess using a subquery didn't work around the problem of the
(r).* getting expanded into multiple columns. This is starting to be a
more annoying limitation than I realized.

This also means when we do things like

select (x).* from (select bt_page_items(...))

or

select (h).* from (select  heap_page_items(...))

It's actually calling bt_page_items() repeatedly, once for every
column in the output record?  Bleagh.

--
greg
http://mit.edu/~gsstark/resume.pdf

pgsql-general by date:

Previous
From: Greg Stark
Date:
Subject: Re: Multiple table entries?
Next
From: Jeff Ross
Date:
Subject: Re: Multiple table entries?