Skip to Main Content

latches and locks - an example?

OracleGuy777Sep 1 2008 — edited Sep 2 2008
hi guys,

I keep coming across these two terms, and I am trying to conceptualise them. I understand why locks are needed on resources (this to me means tables, rows, indexes, sequences etc - maybe something else??). But I am not really sure how latches and locks fit in together. I have gathered the following from googling around.


Provide only exclusive access to protected data structures
Request are not queued, if a request fails, process may try later
Simple data structure
Protect resources that are briefly needed (LRU list)
Very efficient


Allow serialized access to some resources
Requests for locks are queued and serviced in order
Complex data structure that is further protected by latch
Protect resources needed for a longer time (e.g. tables)
Less efficient

If someone could give me an easy example for say a very simple table and show how the lock and latch will interact for a query on that table, it would help me a lot.

This post has been answered by Fco Munoz Alvarez on Sep 2 2008
Jump to Answer
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked due to inactivity on Sep 30 2008
Added on Sep 1 2008