英文:
n_dead_tup vs n_tup_del in Postgres
问题
n_dead_tup
vs n_tup_del
在 pg_stat_all_tables
中的区别是什么?
我理解的是 n_dead_tup
显示了被删除的元组数量,以及作为更新的一部分被删除的旧元组。
n_tup_del
与 n_dead_tup
有什么不同?我能够在执行 VACUUM 后将 n_dead_tup
清零,但 n_tup_del
中仍然有一些计数。
英文:
What is the difference between n_dead_tup
vs n_tup_del
in pg_stat_all_tables
?
What I understand is n_dead_tup
shows the number of tuples that were deleted and the old tuples that were deleted as part of updates.
How does n_tup_del
differ from n_dead_tup
. I am able to clear the n_dead_tup
to zero after doing vacuum and I have some count in n_tup_del
答案1
得分: 1
n_tup_del 是永久累积计数(直到重置或崩溃)。n_dead_tup 是一个当前计数器,会在清理操作时减少。它还会在更新操作以及中止的插入和更新操作中增加。
英文:
n_tup_del is permanent cumulative count (until reset, or a crash). n_dead_tup is a current counter which gets decremented by vacuum. It also gets incremented by updates, and by inserts and updates which abort.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论