Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: INITRANS and MAXTRANS

Re: INITRANS and MAXTRANS

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Fri, 29 May 1998 13:22:04 GMT
Message-ID: <356fb4f9.3752465@192.86.155.100>


A copy of this was sent to Umar FArooq <umar.farooq_at_cressoft.com.pk> (if that email address didn't require changing) On Fri, 29 May 1998 12:54:28 +0500, you wrote:

>yes..but why does Oracle need space in the block...how does it use
>it.....could anyone give me the specifics of the mechanism involved
>

See chapter 10 in the Server Concepts manual for v7.x docs.

    chapter 22 in the v8.x docs.

Basically, transaction information (in effect LOCKS) is stored as an attribute of the data. Instead of storing locks externally from the data, typically implemented in RAM in other systems, we store the locks with the data -- on the block.

this allows for unlimited locking (no ram requirements -- locks exist on the block and the block may be in ram, then again it may not be).

this allows also for faster processing. Instead of going to a big list of locks and asking if "row 5 is locked" and then going to row 5, we just goto row 5 and discover its state. Typically, other systems implement a lock manager that mediates access to a 'lock table' and maintains the locking data structures. Lots of points of serialization in that process, extra overhead as well (goto lock table, goto data vs goto data).

this is one of the reasons row level locking in Oracle is not 'expensive' as others would have you believe. Its as fast as table level locks would be in other systems. The concept is -- goto the data and see if its locked, if it is and you need to lock it, you will wait, else you will lock it right there and then and be done with it.

>thx.
>
>Umar.
>
>Mark Powell wrote:
>
>> The reason that initrans and maxtrans apply to each block is that
>> Oracle
>> maintains row level locking information at the block level and not in
>> the
>> SGA or in a system lock table. Each update process needs a
>> work/record
>> area in the same block as the rows it is affecting.
>>
>
>>
>> > Umar FArooq wrote in message <356CFA80.D51A723F_at_cressoft.com.pk>...
>> > >HI!'
>> > >Could anyone tell me the purpose of INITRANS and MAXTRANS. The
>> ORacle
>> > >documentation says that they specify the space for an initial and
>> max
>> > >number of transactions that can occupy a block. What does this mean
>> and
>> > >what is the need to reserve space for transactions in each block?
>>
>
>
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA  

http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Fri May 29 1998 - 08:22:04 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US