plpgsql slower than sql

Поиск
Список
Период
Сортировка
От jain@gmx.net (Eric)
Тема plpgsql slower than sql
Дата
Msg-id 835c2e5d.0207300450.12faed54@posting.google.com
обсуждение исходный текст
Список pgsql-general
I have a simple procedure involving the following two steps:

1) Check if a certain record exist (SELECT)

2) Create, update or leave the record as is depending on a simple
condition (INSERT, UPDATE, -)


I am aware of two approaches for efficiently implementing this
procedure in a Java application:

A) Use 3 PreparedStatements, handle logic in application.

B) Use 1 PreparedStatement or CallableStatement, put logic in plpgsql
function.


Naturally, I expected the latter to be faster. To my surprise it is
considerable slower. I therefore assume that this is either a known
issue or perhaps I am doing something wrong?

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

Предыдущее
От: "xav"
Дата:
Сообщение: very slow updates
Следующее
От: paulie808@yahoo.com (Paul)
Дата:
Сообщение: ERROR: Can't Parse "" (PG and PHP on Linux)