Table 没有 DELETE 或 UPDATE 操作需要 VACUUM?
Table with no DELETE or UPDATE operations needs VACUUM?
文档说:
VACUUM reclaims storage occupied by dead tuples. In normal PostgreSQL operation, tuples that are deleted or obsoleted by an update are not physically removed from their table; they remain present until a VACUUM is done.
我每天有 table 约 50 000 INSERT
和更多 SELECT
操作,但没有 DELETE
或 UPDATE
操作全部就此 table。
问题是:我是否需要定期 VACUUM
来实现此 table?或者在这种特殊情况下,这根本没有意义?
这样的 table 需要清理的唯一原因是 冻结 元组(将它们标记为永久有效),这样它们就不会在交易柜台环绕。
每个元组只需要发生一次。
文档说:
VACUUM reclaims storage occupied by dead tuples. In normal PostgreSQL operation, tuples that are deleted or obsoleted by an update are not physically removed from their table; they remain present until a VACUUM is done.
我每天有 table 约 50 000 INSERT
和更多 SELECT
操作,但没有 DELETE
或 UPDATE
操作全部就此 table。
问题是:我是否需要定期 VACUUM
来实现此 table?或者在这种特殊情况下,这根本没有意义?
这样的 table 需要清理的唯一原因是 冻结 元组(将它们标记为永久有效),这样它们就不会在交易柜台环绕。
每个元组只需要发生一次。