Why does PostgresQL query performance drop over time, but restored when rebuilding index

后端 未结 5 1259
慢半拍i
慢半拍i 2021-01-31 18:59

According to this page in the manual, indexes don\'t need to be maintained. However, we are running with a PostgresQL table that has a continuous rate of upd

5条回答
  •  你的背包
    2021-01-31 19:48

    Auto vacuum should do the trick, provided you configured it for your desired performance.

    Notes: VACUUM FULL: this will rebuild table statistics and reclaim loads of disk space. It locks the whole table.

    VACUUM: this will rebuild table statistics and reclaim some disk space. It can be run in parallel with production system, but generates lots of IO which can impact performance.

    ANALYZE: this will rebuild query planner statistics. This is triggered by VACUUM, but can be run on its own.

    More detailed notes found here

提交回复
热议问题