如何使用PostgreSQL进行清理? [英] How can I perform the vacuum using the PostgreSQL?

查看:188
本文介绍了如何使用PostgreSQL进行清理?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要清理生产服务器中的PostgreSQL数据库。我是新来的。因此,任何人都知道PostgreSQL的步骤,请指导我。

I need to vacuum the PostgreSQL database in production server. I am very new to do this. So anybody knows the PostgreSQL steps, please guide me.

我认为提高生产服务器中PostgreSQL的性能非常有用。

I think it's very useful to improve the performance of PostgreSQL in production server.

推荐答案

连接到数据库并发出以下命令: VACUUM。这导致可以在正常生产使用期间使用的惰性模式运行。建议您实际上将其作为真空分析来调用,这也会更新统计信息。

Connect to the database and issue this command: "VACUUM". This causes a run in "lazy mode" that can be used during normal production use. It is recommended you actually invoke it as "vacuum analyze" which will also update statistics.

如果要查看大量详细信息,可以在控制台上键入 vacuum。冗长

If you want to see lots of detail, you can at the console type "vacuum verbose"

更极端的形式是真空已满,这会导致大量表锁定,并且不能真正在生产系统上使用。

The more extreme form is "vacuum full" which causes heavy table locking and cannot really be used on a production system.

来源: http://www.postgresql.org/docs /8.1/static/maintenance.html

这篇关于如何使用PostgreSQL进行清理?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆