Postgresql vacuum analyzeITeye - 凯发娱乐

Postgresql vacuum analyzeITeye

2019-01-10 11:08:13 | 作者: 运良 | 标签: | 浏览: 252

There is no VACUUM statement in the SQL standard.<br><br>Postgresql has command VACUUM to cleanup dead tuples in database tables. After deletion, a record still stays in the table, VACUUM makes sure the space is reclaimed and made available for re-use.<br><br>Option ANALYZE would "Updates statistics used by the planner to determine the most efficient way to execute a query".<br><br>So the common usage of it would be running command "VACUUM ANALYZE" after done a bulk deletion and/or update. This would vacuum the whole database. You can append a specific table name after the command to just vacuum the table: "VACUUM ANALYZE your-table-name", like "vacuum analyze fscore.geofence_event;"<br><br>Postgres has an Autovacuum Daemon which would automatically vacuum+analyze the database. This setting is turned on by default and you can check it on by running this command: "show autovacuum;"<br><br>AWS RDS of postgres also has it on by default.
版权声明
本文来源于网络,版权归原作者所有,其内容与观点不代表凯发娱乐立场。转载文章仅为传播更有价值的信息,如采编人员采编有误或者版权原因,请与我们联系,我们核实后立即修改或删除。

猜您喜欢的文章

阅读排行

  • 1

    数据库拜访优化规律ITeye

    数据,索引,运用
  • 2

    导入导出与字符集ITeye

    字符集,导入,导出
  • 3

    游标笔记ITeye

    游标,数据,读取
  • 4

    SQLSERVER分页查询ITeye

    查询,代码,计划
  • 5
  • 6

    oracle暗码修正办法ITeye

    暗码,修正,用户
  • 7
  • 8
  • 9
  • 10

    oracle 树查询ITeye

    节点,相关,条件