- 最新
- 投票最多
- 评论最多
After upgrading my Postgres instance from 10.6 to 11.2, I'm seeing high IOPS and my queries are taking more time to complete.
Before the upgrade, my long running queries takes 300-400 write IOPS to complete.
After the upgrade, my long running queries takes 1000-1200 write IOPS to complete.
Same problem here also if with Sql Server.
after an update to sql server some days ago, I am having problem of HIGH CPU utilization.
It is exactly the same situation of november (when I updated sql instance to a major release). I just rebooted the instance but did NOT solved the problem.... Please help me.
Please note by default RDS postgres makes use of Pg_upgrade call for the major version upgrade. Although RDS is managed service but it doesn't applies any additional methods/activities over the Vanila Postgres defined actions/workflows. With reference to the following official PostgreSQL documentation[1] :
"Statistics: Because optimizer statistics are not transferred by pg_upgrade, you will be instructed to run a command to regenerate that information at the end of the upgrade."
Additionally, please check the note under AWS RDS PostgreSQL Major version Upgrade document[2], which states “After you have completed the upgrade, you should run the ANALYZE operation to refresh the pg_statistic table“. In future, you can make use of the below method for running ANALYZE for in a better and a faster way.
This also makes SQLs performing better. A better way to do that is using vacuumdb[3], like this:
vacuumdb -U [your user] -d [your database] -Ze -h [your rds endpoint]
It will optimize your database execution plan only, not freeing space, but will take less time than a complete vacuum.
References/Links:
[1] https://www.postgresql.org/docs/10/static/pgupgrade.html
[2] https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.PostgreSQL.html
[3] https://www.postgresql.org/docs/10/static/app-vacuumdb.html
相关内容
- AWS 官方已更新 1 年前
- AWS 官方已更新 4 个月前
- AWS 官方已更新 2 年前