pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
PostgreSQL and Performance of Functions
5+ messages / 4 participants
[nested] [flat]

* PostgreSQL and Performance of Functions
@ 2006-11-30 21:28  Aaron Bono <postgresql@aranya.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Aaron Bono @ 2006-11-30 21:28 UTC (permalink / raw)
  To: pgsql-admin

Recently I have been put on a project that uses DB2 (not my choice).  I am
using functions for reports and was told this may not be allowed.  They
said:

One gap is the ability to tune the code in the function (not really static)
or to perform real-time analysis of performance problems.

I normally use PostgreSQL for all my applications (this being an
exception).  Does anyone know what this statement is about and, more
importantly, does PostgreSQL have the same limitations?

Thanks,
Aaron

-- 
==================================================================
   Aaron Bono
   Aranya Software Technologies, Inc.
   http://www.aranya.com
   http://codeelixir.com
==================================================================

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: PostgreSQL and Performance of Functions
@ 2006-12-01 09:45  Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
  parent: Aaron Bono <postgresql@aranya.com>
  0 siblings, 2 replies; 5+ messages in thread

From: Rajesh Kumar Mallah @ 2006-12-01 09:45 UTC (permalink / raw)
  To: Aaron Bono <postgresql@aranya.com>; +Cc: pgsql-admin

On 12/1/06, Aaron Bono <postgresql@aranya.com> wrote:
>
> Recently I have been put on a project that uses DB2 (not my choice).  I am
> using functions for reports and was told this may not be allowed.  They
> said:
>
> One gap is the ability to tune the code in the function (not really
> static) or to perform real-time analysis of performance problems.
>

Tuning the code in function requires to change the file containing the
function
defination and reloading the function. Hence the cycle of performance tuning
is
longer.

Regarding "real time analysis" what I understand is

EXPLAIN ANALYSE (of main SQL using the function) in postgresql cannot
provide the realtime analysis of the performace of queries inside the
function.
probably such a limitation may exists in db2 also.

I think the gap is genuine.

regds
mallah.







I normally use PostgreSQL for all my applications (this being an
> exception).  Does anyone know what this statement is about and, more
> importantly, does PostgreSQL have the same limitations?
>
> Thanks,
> Aaron
>
> --
> ==================================================================
>    Aaron Bono
>    Aranya Software Technologies, Inc.
>    http://www.aranya.com
>    http://codeelixir.com
> ==================================================================

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: PostgreSQL and Performance of Functions
@ 2006-12-01 22:43  Simon Riggs <simon@2ndquadrant.com>
  parent: Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
  1 sibling, 0 replies; 5+ messages in thread

From: Simon Riggs @ 2006-12-01 22:43 UTC (permalink / raw)
  To: Rajesh Kumar Mallah <mallah.rajesh@gmail.com>; +Cc: Aaron Bono <postgresql@aranya.com>; pgsql-admin

On Fri, 2006-12-01 at 15:15 +0530, Rajesh Kumar Mallah wrote:
> I think the gap is genuine.

I think you need to take a look at the EnterpriseDB Debugger. 

It solves the problem, so I suggest you take a look.

Open Source versions are available, AFAIK.

-- 
  Simon Riggs             
  EnterpriseDB   http://www.enterprisedb.com





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: PostgreSQL and Performance of Functions
@ 2006-12-02 00:21  Aaron Bono <postgresql@aranya.com>
  parent: Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
  1 sibling, 1 reply; 5+ messages in thread

From: Aaron Bono @ 2006-12-02 00:21 UTC (permalink / raw)
  To: Rajesh Kumar Mallah <mallah.rajesh@gmail.com>; +Cc: pgsql-admin

On 12/1/06, Rajesh Kumar Mallah <mallah.rajesh@gmail.com> wrote:
>
>
>
> On 12/1/06, Aaron Bono <postgresql@aranya.com> wrote:
> >
> > Recently I have been put on a project that uses DB2 (not my choice).  I
> > am using functions for reports and was told this may not be allowed.  They
> > said:
> >
> > One gap is the ability to tune the code in the function (not really
> > static) or to perform real-time analysis of performance problems.
> >
>
> Tuning the code in function requires to change the file containing the
> function
> defination and reloading the function. Hence the cycle of performance
> tuning is
> longer.
>
> Regarding "real time analysis" what I understand is
>
> EXPLAIN ANALYSE (of main SQL using the function) in postgresql cannot
> provide the realtime analysis of the performace of queries inside the
> function.
> probably such a limitation may exists in db2 also.
>
> I think the gap is genuine.
>
>
> I normally use PostgreSQL for all my applications (this being an
> > exception).  Does anyone know what this statement is about and, more
> > importantly, does PostgreSQL have the same limitations?
> >
> > Thanks,
> > Aaron
> >
> >
>

I was told that, for DB2, stored procedures are a better choice for
parameterized views which is what I was trying to do with the functions.  Is
the same true for PostgreSQL?

-Aaron


-- 
==================================================================
   Aaron Bono
   Aranya Software Technologies, Inc.
   http://www.aranya.com
   http://codeelixir.com
==================================================================

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: PostgreSQL and Performance of Functions
@ 2006-12-02 01:33  Peter Eisentraut <peter_e@gmx.net>
  parent: Aaron Bono <postgresql@aranya.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Peter Eisentraut @ 2006-12-02 01:33 UTC (permalink / raw)
  To: pgsql-admin; +Cc: Aaron Bono <postgresql@aranya.com>; Rajesh Kumar Mallah <mallah.rajesh@gmail.com>

Aaron Bono wrote:
> I was told that, for DB2, stored procedures are a better choice for
> parameterized views which is what I was trying to do with the
> functions.  Is the same true for PostgreSQL?

That depends somewhat on the meaning of "better", but on average a view 
should be preferred if possible.  It's easier to set up, easier to 
debug, and at least as efficient.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2006-12-02 01:33 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-11-30 21:28 PostgreSQL and Performance of Functions Aaron Bono <postgresql@aranya.com>
2006-12-01 09:45 ` Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
2006-12-01 22:43   ` Simon Riggs <simon@2ndquadrant.com>
2006-12-02 00:21   ` Aaron Bono <postgresql@aranya.com>
2006-12-02 01:33     ` Peter Eisentraut <peter_e@gmx.net>

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