Behaviour of update statistics in case when is transaction rollback

隐身守侯 提交于 2019-12-10 23:31:50

问题


In our application we are running query 'update statistics with sample 30 percent'.

Our system design is such that we have to use update statistics query once a day to improve query performance.

We are setting autocommit as false, running 'update statistics' and then some queries which are failing causing a connection rollback.

In this case does 'update statistics' query rollback as well? Should I again run update statistics command the second time? Does 'update statistics' auto commit, or should I commit after 'update statistics' and then execute the remaining queries?

Thanks.


回答1:


Update statistics will rollback back with the rest of the transaction.



来源:https://stackoverflow.com/questions/15110058/behaviour-of-update-statistics-in-case-when-is-transaction-rollback

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!