dynamic SQL - possible performance regression in 9.2
От | Pavel Stehule |
---|---|
Тема | dynamic SQL - possible performance regression in 9.2 |
Дата | |
Msg-id | CAFj8pRCKfoz6L82PovLXNK-1JL=jzjwaT8e2BD2PwNKm7i7KVg@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: dynamic SQL - possible performance regression in 9.2
|
Список | pgsql-hackers |
Hello I rechecked performance of dynamic SQL and it is significantly slower in 9.2 than 9.1 -- 9.1 postgres=# create or replace function test() returns void as $$ begin for i in 1..1000000 loop execute 'select 1'; end loop; end $$ language plpgsql; CREATE FUNCTION postgres=# \timing Timing is on. postgres=# select test();test ------ (1 row) Time: 7652.904 ms postgres=# select test();test ------ (1 row) Time: 7828.025 ms -- 9.2 postgres=# create or replace function test() returns void as $$ begin for i in 1..1000000 loop execute 'select 1'; end loop; end $$ language plpgsql; CREATE FUNCTION Time: 59.272 ms postgres=# select test();test ------ (1 row) Time: 11153.646 ms postgres=# select test();test ------ (1 row) Time: 11081.899 ms This test is synthetic, but it shows so somebody who use dynamic SQL in triggers (for partitioning) can has slower operations.
В списке pgsql-hackers по дате отправления: