Re: Performance of c, pl/perl, pl/pgsql

Поиск
Список
Период
Сортировка
От Joel Burton
Тема Re: Performance of c, pl/perl, pl/pgsql
Дата
Msg-id Pine.LNX.4.21.0104300919590.6719-100000@olympus.scw.org
обсуждение исходный текст
Ответ на Performance of c, pl/perl, pl/pgsql  (Einar Karttunen <ekarttun@cs.Helsinki.FI>)
Список 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@scw.org>
Director of Information Systems, Support Center of Washington


В списке pgsql-general по дате отправления:

Предыдущее
От: Zak McGregor
Дата:
Сообщение: System catalogues
Следующее
От: "Eric G. Miller"
Дата:
Сообщение: Re: running pgaccess on localhost