bestlong 怕失憶論壇
標題:
定時為 PostgreSQL 做 vacuum
[打印本頁]
作者:
bestlong
時間:
2007-1-4 10:34
標題:
定時為 PostgreSQL 做 vacuum
將底下加入 crond 排程內,每天清晨3點為資料庫 vacuum,每月1日清晨5點做一次 vacuum full。
00 3 * * * postgres vacuumdb -a -z
00 5 1 * * postgres vacuumdb -a -z -f
備註:
-a:vacuum all databases
-z:analyze,update optimizer hints
-f:do full vacuuming
歡迎光臨 bestlong 怕失憶論壇 (http://www.bestlong.idv.tw/)
Powered by Discuz! X1.5