Re: using of select (myfunction()).* is so slow

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Gerardo Herzig <gherzig(at)fmed(dot)uba(dot)ar>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: using of select (myfunction()).* is so slow
Date: 2011-02-03 19:47:31
Message-ID: AANLkTimY=sDSpAmivZyPCZqhwzO+38tBd+rKFT+6cY=9@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello

If you use a record expansion over function's result, then function is
called once for record's field.

so don't do it on slow functions.

Regards

Pavel

2011/2/3 Gerardo Herzig <gherzig(at)fmed(dot)uba(dot)ar>:
> Hi all, im using a function of my own in a subquery, and when wonderig
> about the slowliness of this one, y relalize that:
>
> test=# SELECT (_xxfunction(854,'711H',11,false)).* ;
> (4 filas)
> --Result DELETED
> Duración: 1069,465 ms
>
>
> glyms=# SELECT * from _xxfunction(854,'711H',11,false) ;
> (4 filas)
> Duración: 228,699 ms
>
> For privacy reasons, i just deleted the result and the function name,
> but the resulst are obviously exactly the same, and the ().* form (which
> i needed) is taking so much more...there is a reason why? A workaround?
>
> Thanks!
>
> Gerardo
>
>
> --
> Sent via pgsql-sql mailing list (pgsql-sql(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
>

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message msi77 2011-02-04 07:02:42 Re: UNIQUE on everything except primary key
Previous Message Gerardo Herzig 2011-02-03 18:40:02 using of select (myfunction()).* is so slow