Re: calling procedures is slow and consumes extra much memory againstcalling function

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: calling procedures is slow and consumes extra much memory againstcalling function
Дата
Msg-id CAFj8pRABiMH9zZuqYh13W5g1FYfpcd5vmQsLkNYLE3ys-84Ssw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: calling procedures is slow and consumes extra much memory againstcalling function  (Ranier Vilela <ranier.vf@gmail.com>)
Ответы Re: calling procedures is slow and consumes extra much memory againstcalling function  (Ranier Vilela <ranier.vf@gmail.com>)
Список pgsql-hackers


so 16. 5. 2020 v 0:34 odesílatel Ranier Vilela <ranier.vf@gmail.com> napsal:
Em dom., 10 de mai. de 2020 às 17:21, Pavel Stehule <pavel.stehule@gmail.com> escreveu:
Hi

I try to use procedures in Orafce package, and I did some easy performance tests. I found some hard problems:

1. test case

create or replace procedure p1(inout r int, inout v int) as $$
begin v := random() * r; end
$$ language plpgsql;

This command requires

do $$
declare r int default 100; x int;
begin
  for i in 1..300000 loop
     call p1(r, x);
  end loop;
end;
$$;

about 2.2GB RAM and 10 sec.
I am having a consistent result of 3 secs, with a modified version (exec_stmt_call) of your patch.
But my notebook is (Core 5, 8GB and SSD), could it be a difference in the testing hardware?

My notebook is old T520, and more I have a configured Postgres with --enable-cassert option.

regards

Pavel


regards,
Ranier Vilela

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Potentially misleading name of libpq pass phrase hook
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: pgindent && weirdness