Skip site navigation (1) Skip section navigation (2)

low performance on functions returning setof record

From: "Sabin Coanda" <sabin(dot)coanda(at)deuromedia(dot)ro>
To: pgsql-performance(at)postgresql(dot)org
Subject: low performance on functions returning setof record
Date: 2008-10-09 14:47:30
Message-ID: gcl5hg$2kq8$1@news.hub.org (view raw or flat)
Thread:
Lists: pgsql-performance
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 



Responses

pgsql-performance by date

Next:From: Tom LaneDate: 2008-10-09 19:30:51
Subject: Re: low performance on functions returning setof record
Previous:From: Віталій ТимчишинDate: 2008-10-09 12:54:38
Subject: Re: Delete performance again

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group