[Info-vax] RDB Question

Arne Vajhøj arne at vajhoej.dk
Tue Dec 4 16:19:45 EST 2018


On 12/4/2018 11:43 AM, Dave Froble wrote:
> On 12/4/2018 10:16 AM, Jan-Erik Söderholm wrote:
>> Note also that, even if Rdb supports record locking (has done from
>> V1.0, if I'm not wrong), it also has something called "Adjustable
>> record locking". So Rdb doesn't move locks down to the record level
>> if it doesn't have to (row contention between users).
>>
>> The default is what is shown from this database dump below.
>> So one single process doing a large query on its own will put
>> locks at blocks of 1000 database pages at a time (to start with).
> 
> Jan-Erik, I know you didn't design and implement Rdb, so I'm not 
> directing this at you.
> 
> I have to ask, why would Rdb be taking out locks for a query (if I'm 
> understanding the definition of query)?  If one is going to read, but 
> never write, then why lock?  While there just may be some reason to not 
> read locked data, that is not normally the case.  There is great 
> efficiency in skipping the locking when it is not needed.

RDBMS'es has a very specific definition of transaction isolation
level.

As an example with REPEATABLE READ and SERIALIZEABLE then:

BEGIN TRANSACTION
read some data
do some stuff
read same data again
COMMIT or ROLLBACK transaction

then the two reads has to return the same data.

Arne






More information about the Info-vax mailing list