+ 2

Why commit is faster than rollback?? Why rollback takes more time than commit?

20th Mar 2017, 6:27 PM
rohit paul
rohit paul - avatar
2 odpowiedzi
+ 9
Commit should be a very minimal operation because commit shouldn't fail. Before commit everything has been done and just wait for finishing. Rollback should remove everything that was done before.
20th Mar 2017, 8:06 PM
Tamás Barta
Tamás Barta - avatar
+ 1
According to me, both commit and rollback will take standard time O(1) i.e milliseconds. Actual time consumed by Insert, Delete, Update statements after which commit or rollback is called. Commit and rollback is actually generates “System Change No”/SCN which executes in milliseconds. (SCN assures data is consistent between multiple session) Actual time is consumed by Insert, Delete, Update which involves fetching of data from secondary memory to SGA or writing data back to Secondary storage from SGA. So commit / rollback just gonna change system change number which will take constant time.
21st Mar 2017, 8:20 AM
Akwin Lopez
Akwin Lopez - avatar