hot update doesn't work?
От | Pavel Stehule |
---|---|
Тема | hot update doesn't work? |
Дата | |
Msg-id | AANLkTinmZQb5B1D5rRxEvGJp5qWdpbOjgJNDrggwBa8A@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: hot update doesn't work?
|
Список | pgsql-hackers |
Hello I would to repeatably update non indexed column of temp table. I expected cheap operation, but it isn't true. p ostgres=# create temp table x(a int primary key, b int); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "x_pkey" for table "x" CREATE TABLE Time: 363,339 ms postgres=# insert into x values(1,0); INSERT 0 1 Time: 11,676 ms postgres=# create or replace function s1() returns void as $$ begin for i in 1..100000 loop update x set b = i where a = 1; end loop; return; end; $$ language plpgsql; CREATE FUNCTION Time: 113,052 ms postgres=# select s1();s1 ---- (1 row) Time: 255223,249 ms postgres=# select pg_total_relation_size('x');pg_total_relation_size ------------------------ 3686400 (1 row) the size of table was significantly increased :(. what I doing wrong? Regards Pavel Stehule
В списке pgsql-hackers по дате отправления: