Is there any significant difference in performance in using PESSIMISTIC_WRITE as LockMode in hibernate criteria as an alternative for Select for update query.
Use case involves following points:
- Restrictions on values in multiple columns like status, time
- Sorting on multiple columns
- Select only the first row for processing.
This processing is done simultaneously by multiple machines/threads. I am currently using hibernate criteria, and that is causing timeouts in getting lock multiple times, which results in choking of all other queries.