From: | Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: calling procedures is slow and consumes extra much memory against calling function |
Date: | 2020-05-15 22:33:45 |
Message-ID: | CAEudQAoJY7p-fvw0-xcLvb89df5Sq4WTYOZq8SpJYwjpG=XTAQ@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Em dom., 10 de mai. de 2020 às 17:21, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)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?
regards,
Ranier Vilela
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2020-05-15 23:05:39 | Re: pg_stat_wal_receiver and flushedUpto/writtenUpto |
Previous Message | Tom Lane | 2020-05-15 22:18:34 | Re: pgindent && weirdness |