2017-04-07 67 views

回答

1

我保存的統計信息,並從pg_stat_all_tables爲比較,如我只是順序跑:

t=# select schemaname,relname,n_tup_ins,n_tup_upd,n_tup_del from pg_stat_all_tables where relname = 'rapid_inserts'; 
schemaname |  relname  | n_tup_ins | n_tup_upd | n_tup_del 
------------+--------------------+-----------+-----------+----------- 
public  | rapid_inserts| 254681563 |   0 |   0 
(1 row) 

Time: 10.921 ms 
t=# select schemaname,relname,n_tup_ins,n_tup_upd,n_tup_del from pg_stat_all_tables where relname = 'rapid_inserts'; 
schemaname |  relname  | n_tup_ins | n_tup_upd | n_tup_del 
------------+--------------------+-----------+-----------+----------- 
public  | rapid_inserts| 254681569 |   0 |   0 
(1 row) 

Time: 10.980 ms 

這意味着6行被插入在勉強第二。同樣的工作更新和刪除...

+0

感謝Vao的快速回復。有沒有辦法找到哪個行插入/更新/ deletd,以便etl可以直接處理這些行? –

+0

否 - 您需要觸發器 –

相關問題