G
gus bjorklund
Guest
there are two different mechanisms at work here. when you do a query such as a for each or a find and a record is retrieved, then we look to see if there is a copy of the same record in the buffer’s ICB structure. “same” is defined as matching row id and table. if there is a match then we have to decide which copy of the record should be kept. the original logic was that if the lock strengths are different, then the higher one is kept. if the same, then the older copy is kept. this was done because it increased read consistency a bit. because times changed, people wanted the new logic which was to take the new record instead of the older one. the other mechanism is used for find by rowid. in that case, before fetching the record, we check the buffer to see if it contains a matching rowid with the same or higher lock strength. if so, then the record is not fetched again from the database.
Continue reading...
Continue reading...