Find the transaction's wait and lifetime
Inspect active transaction age, current query, session owner, and lock waits using supported monitoring tools. A transaction may be waiting on application input or network I/O rather than actively using the database.
Large batch work and user interactions should usually be split into shorter units when business rules allow. Holding a transaction open while a person reviews a screen can block writes or preserve obsolete versions longer than needed.
Reduce impact safely
Commit or roll back only after confirming operation state and recovery requirements; killing a session can leave application work incomplete. Use bounded timeouts where appropriate and make error handling explicit.
Monitor transaction age and lock duration, then optimize the query or workflow causing the long hold. Do not split a required atomic operation without accounting for partial completion and consistency.