From: Sabin Coanda <sabin.coanda@deuromedia.ro>
To: pgsql-performance@postgresql.org
Subject: low performance on functions returning setof record
Date: Thu, 9 Oct 2008 17:47:30 +0300
Message-ID: <gcl5hg$2kq8$1@news.hub.org> (raw)
Hi there,
I use different functions returning setof record, and they are working well.
The problem is the performance when I use those functions in joins, for
instance:
SELECT *
FROM "Table1" t1
JOIN "Function1"( a1, a2, ... aN ) AS f1( ColA int4, ColB
varchar, ... )
ON t1.ColX = f1.ColA
The problem is I'm not able to make indexes on the function, even inside I
have just another select statement from different permanent tables, with
some where clauses depending on the function arguments.
Do you know a way to build such a function, returning something I can join
in an outer select statement like above, using indexes or another way to run
it faster ?
TIA,
Sabin
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: sabin.coanda@deuromedia.ro
Subject: Re: low performance on functions returning setof record
In-Reply-To: <gcl5hg$2kq8$1@news.hub.org>
* 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