Recently I had to research a “enq: TM contention” wait event. I queried active session history (ASH) an found blocking session’s id.
I queried ASH again and found what the blocking session was doing right at the time when the other session was waiting on the “enq: TM contention” lock. At this time there was a long running select statement active in the blocking session.
How is that possible? Can a select create a lock? What must have happened ? Would it actually help to tune the select?
For a further hint you might wat to read Arup Nanda’s blog on transaction locks.