Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 0D7941337B3E for ; Fri, 4 Feb 2011 07:10:00 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 70436-01 for ; Fri, 4 Feb 2011 11:09:52 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.fmed.uba.ar (mail.fmed.uba.ar [157.92.152.1]) by mail.postgresql.org (Postfix) with ESMTP id AE6961337B2F for ; Fri, 4 Feb 2011 07:09:52 -0400 (AST) Received: from [157.92.152.105] (unknown [157.92.152.105]) by mail.fmed.uba.ar (Postfix) with ESMTP id D8A894A4C15; Fri, 4 Feb 2011 09:07:38 -0200 (ARST) Subject: Re: using of select (myfunction()).* is so slow From: Gerardo Herzig To: Pavel Stehule Cc: pgsql-sql@postgresql.org In-Reply-To: References: <1296758402.30254.6.camel@inca.fmed.uba.ar> Content-Type: text/plain; charset="UTF-8" Date: Fri, 04 Feb 2011 07:51:13 -0300 Message-ID: <1296816673.1100.2.camel@inca.fmed.uba.ar> Mime-Version: 1.0 X-Mailer: Evolution 2.30.1.2 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201102/16 X-Sequence-Number: 35092 El jue, 03-02-2011 a las 20:47 +0100, Pavel Stehule escribió: > 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 : > > 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@postgresql.org) > > To make changes to your subscription: > > http://www.postgresql.org/mailpref/pgsql-sql > > > Mmmmm ok Thanks...So there is no workaround/alternative to this? Gerardo