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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Performance: sql functions v. plpgsql v. plperl
Дата
Msg-id 29144.988215099@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Performance: sql functions v. plpgsql v. plperl  (Joel Burton <jburton@scw.org>)
Ответы Re: Performance: sql functions v. plpgsql v. plperl  (Joel Burton <jburton@scw.org>)
Список pgsql-general
Joel Burton <jburton@scw.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

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Converting queries to upper case
Следующее
От: Tom Lane
Дата:
Сообщение: Re: indices are crashed after installation of rpm