Re: [GENERAL] Performance PLV8 vs PLPGSQL

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: [GENERAL] Performance PLV8 vs PLPGSQL
Дата
Msg-id CAHyXU0yj7KEW2f+NQSnNgRyo=H6GF5mRDjs+VWQ9jK1qqtNRHw@mail.gmail.com
обсуждение исходный текст
Ответ на [GENERAL] Performance PLV8 vs PLPGSQL  (Tim Uckun <timuckun@gmail.com>)
Список pgsql-general
On Wed, Dec 28, 2016 at 3:15 AM, Tim Uckun <timuckun@gmail.com> wrote:
> I have seen various links on the internet which indicate that PLV8 is
> significantly faster than PL-PGSQL sometimes an order of magnitude faster.
>
> Is this uniformly true or is it just in certain circumstances?
>
> Is there any benefit to choosing PL-PGSQL?
>
> Is there work going on to make PL-PGSQL more performant or has it gotten
> significantly faster in the last two years or so (some of the links are a
> from a while ago).

Pavel covered it pretty well but I'll chime in also.  In typical usage
of pl/pgsql the overhead of the language itself is minimal.  Most of
the heavy lifting is done by the SQL engine. pl/pgsql is glue that
sticks SQL statements together basically.  Heavy computation in
pl/pgsql can be problematic but is rarely necessary.  pl/v8 is
definitively a better choice for such cases but not being in core can
be an issue for some people.

The advantage of pl/pgsql is that SQL statements, types and errors are
native to the language itself.  This makes many things much easier to
do...pl/pgsql is maybe the most efficient data processing language (in
terms of efficiency of coding) in existence.   That may smack of
overstatement but my entire career is built around being good at it so
I'm inclined to effusiveness :-D.

merlin


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

Предыдущее
От: Kisung Kim
Дата:
Сообщение: Re: [GENERAL] Performance degradation when using auto_explain
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: [GENERAL] Performance degradation when using auto_explain