I really don't understand promises about waits in case of concurrent data access.
All manuals operate by term lock. No one explains that lock probably causes SQL clients waiting for lock acquisition on the server side (and it can take seconds / minutes / infinity)?
Are there cases when locks don't cause waits? I can imagine:
READ UNCOMMITTEDin some situations, like there are no DDL?
- error is reported without waiting...
- no one waits but first who does
commitwins, other fail on their
I reviewed JDBC API: it mentions literally:
SQLTimeoutException - when the driver has determined that the timeout value that was specified by the setQueryTimeout method has been exceeded and has at least attempted to cancel the currently running Statement`
According to the docs timeout is detected on the client side. Widely used client API doesn't have influence on server side timeouts (including caused by locks). Probably you can set some proprietary connection properties to influence DB behavior.
I see some proprietary SQL extensions, like:
SET LOCK_TIMEOUT timeout_period
set lock_timeout ms&
set statement_timeout ms
For me DB waits due to locks is such a grey area. Does a lock mean a wait?