RE: Schema variables - new implementation for Postgres 15

Поиск
Список
Период
Сортировка
От tsunakawa.takay@fujitsu.com
Тема RE: Schema variables - new implementation for Postgres 15
Дата
Msg-id TYAPR01MB299061DBBFF5C2EBBD307F7FFE4D9@TYAPR01MB2990.jpnprd01.prod.outlook.com
обсуждение исходный текст
Ответ на Schema variables - new implementation for Postgres 15  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: Schema variables - new implementation for Postgres 15
Список pgsql-hackers

From: Pavel Stehule <pavel.stehule@gmail.com>

--------------------------------------------------

do $$

declare x int ;

begin

  for i in 1..1000000

  loop

    let ooo = i;

  end loop;

end;

$$;

 

variant 1 .. 1500 ms

variant 2 with PLpgSQL support .. 140 ms

variant 2 without PLpgSQL support 9000 ms

--------------------------------------------------

 

 

That's impressive!  But 1 million times of variable assignment took only 140 ms?  It's that one assignment took only 140 nanosecond, which is near one DRAM access?  Can PL/pgSQL processing be really so fast?

 

 

Regards

Takayuki Tsunakawa

 

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Commit ab596105b55 - BRIN minmax-multi indexes
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: Schema variables - new implementation for Postgres 15