Re: final patch - plpgsql: for-in-array

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Merlin Moncure <mmoncure(at)gmail(dot)com>, Jaime Casanova <jaime(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: final patch - plpgsql: for-in-array
Date: 2010-11-18 18:17:26
Message-ID: AANLkTi=NzvVyrERK4B73O0PU_+Oakvf3J30zwPaE50AL@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 18, 2010 at 1:03 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
> 2010/11/18 Robert Haas <robertmhaas(at)gmail(dot)com>:
>> On Thu, Nov 18, 2010 at 12:36 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> I would *much* rather we get the performance benefit by internal
>>> optimization, and forego inventing syntax.
>>
>> +1.
>
> any optimization will be about 10-20% slower than direct access. See
> my tests: on large arrays isn't significant if you use a simple
> expression or full query. This is just overhead from building a
> "tuplestore" and access to data via cursor. And you cannot to change a
> SRF functions to returns just array. I would to see any optimization
> on this level, but I think so it's unreal expecting.

How can you possibly make a general statement like that? What's slow
is not the syntax; it's what the syntax is making happen under the
hood.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-11-18 18:21:50 Re: Indent authentication overloading
Previous Message Aidan Van Dyk 2010-11-18 18:12:43 Re: Indent authentication overloading