Re: Performance: sql functions v. plpgsql v. plperl

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joel Burton <jburton(at)scw(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Performance: sql functions v. plpgsql v. plperl
Date: 2001-04-25 16:11:39
Message-ID: 29144.988215099@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Joel Burton <jburton(at)scw(dot)org> writes:
> Last night, I was doing some amateurish benchmarking and found that,
> contrary to my (admittedly uninformed) expectation, sql functions seem
> *slower* than plsql functions.

IIRC, sql functions are re-parsed/planned on each execution, whereas
plpgsql functions cache their parse trees and execution plans.
Depending on exactly what you were doing, that might explain the
difference.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-04-25 16:15:36 Re: indices are crashed after installation of rpm
Previous Message Tom Lane 2001-04-25 16:09:08 Re: Converting queries to upper case