Re: insert/update performance
От | Jinhua Luo |
---|---|
Тема | Re: insert/update performance |
Дата | |
Msg-id | CAAc9rOzZyb_jutc9dVmdn=8jiqybvSfYY75wnm3YJim76p-s5g@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: insert/update performance (Jinhua Luo <luajit.io@gmail.com>) |
Список | pgsql-hackers |
And I also found the pg_stat_all_tables may be not so accurate. testdb=# truncate test; testdb=# select pg_stat_reset_single_table_counters(42515); testdb=# select n_tup_ins,n_tup_upd,n_tup_hot_upd,n_tup_del,n_live_tup,n_dead_tup from pg_stat_all_tables where relid=42515;n_tup_ins | n_tup_upd | n_tup_hot_upd | n_tup_del | n_live_tup | n_dead_tup -----------+-----------+---------------+-----------+------------+------------ 0 | 0 | 0 | 0 | 0 | 0 (1 row) ##### run application a while testdb=# select n_tup_ins,n_tup_upd,n_tup_hot_upd,n_tup_del,n_live_tup,n_dead_tup from pg_stat_all_tables where relid=42515;n_tup_ins | n_tup_upd | n_tup_hot_upd | n_tup_del | n_live_tup | n_dead_tup -----------+-----------+---------------+-----------+------------+------------ 24829 | 24839 | 0 | 0 | 24829 | 24839 (1 row) testdb=# select count(*) from test;count -------24780 (1 row) testdb=# vacuum verbose test; ... DETAIL: 24780 index row versions were removed. ... INFO: "test": found 863 removable, 24780 nonremovable row versions in 3148 out of 3148 pages The n_tup_ins is bigger than actual rows, and the n_tup_upd is even bigger than n_tup_ins! Regards, Jinhua Luo
В списке pgsql-hackers по дате отправления: