From: | Joel Burton <jburton(at)scw(dot)org> |
---|---|
To: | Einar Karttunen <ekarttun(at)cs(dot)Helsinki(dot)FI> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Performance of c, pl/perl, pl/pgsql |
Date: | 2001-04-30 13:23:03 |
Message-ID: | Pine.LNX.4.21.0104300919590.6719-100000@olympus.scw.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, 30 Apr 2001, Einar Karttunen wrote:
> Hello
>
> Has anyone benchmarked how slow/fast the procedural languages are. I know
> that pl/perl is probably faster than pl/pgsql. But how much? How much
> faster are native c-functions...
>
> ps. Is there any good documentation on pl/perl. The programmers manual
> didn't have much information.
No, pl/perl is slower than pl/pgsql: that is, the overhead of calling it
for simple functions is more (about 30% more, in some very simple testing
I did.) However, since perl has so many built-in fucntions (regexs, great
string handling, etc.) any real function that does anything slightly
complex should be a great deal faster than pl/pgsql. A pretty
straightfoward hash an organization name to their acronym function was
about 40% faster in pl/perl.
The only native C functions I had to test were the simple ones that come
w/PostgreSQL (min(), max(), etc.) They were about twice as fast as a
straigtforward plpgsql replacement.
Again, take these numbers w/a big grain of salt -- these were off-the-cuff
tests I did out of curiosity.
You can refer to my posting ~2 weeks ago for more info.
--
Joel Burton <jburton(at)scw(dot)org>
Director of Information Systems, Support Center of Washington
From | Date | Subject | |
---|---|---|---|
Next Message | Torsten Krmer | 2001-04-30 13:28:06 | how to close idle connection created with php's pg_pconnect() |
Previous Message | Zak McGregor | 2001-04-30 12:42:16 | System catalogues |