+ 2
Why commit is faster than rollback?? Why rollback takes more time than commit?
2 Réponses
+ 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.
+ 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.