April 2026
Beginner
493 pages
23h 2m
English
Before we conclude this chapter, it’s useful to highlight some pitfalls of TCL that you should avoid as much as possible.
Ignoring and avoiding TCL is an obvious pitfall. Some sample cases are as follows:
Not using COMMIT or ROLLBACK despite modifying rows of multiple related tables
Ignoring ROLLBACK on errors
Not locking rows or tables before applying changes
Not using transaction isolation in critical queries
However, abusing TCL to a point where other transactions are affected is another pitfall. Some sample cases are as follows:
Locking more rows than necessary
Keeping locks active for too long
Using unnecessarily restrictive or too flexible transaction isolation modes ...
Read now
Unlock full access