Databases Reference
In-Depth Information
We can see the results of the query in the following screenshot:
Obviously, we can obtain the same results in a single query; here we preferred to split the
results into two queries for graphical reasons.
There's more...
Latches are lightweight synchronization mechanisms that implement serialization in an
efficient and low-level way. They don't support queuing, so when a latch request is not
satisfied, the request fails and the process can only retry to acquire the busy latch, by polling.
The internal implementation of latches is related to the OS and platform. Often it's
implemented using a single memory location and a single atomic instruction to test and set
the latch. Busy latches are usually identified by a non-zero value.
When more latches are needed to access a specific data structure, for example the library
cache, there is a parent-child latch relationship, so the database needs to acquire the parent
latch to access the child latch.
In single processor machines (are there any more?), when a latch was busy the process
requesting the latch would release the CPU and sleep for a brief time, to allow other
processes to acquire the CPU. This event was logged as a latch free wait event.
 
Search WWH ::




Custom Search