RE: enq: TX - index contention

I think the confusion here IS that Oracle allocates 1 (ONE) initrans
(ITL) for EACH  BLOCK that is allocated to the table.  By default,
oracle allocates 2 BLOCKS  (Database blocks) for every table (5 for
every index) that gets created.  So, I can well see where you
would/could get 2 ITL for a newly created table based on the 2 data
blocks allocated.=20

Now, if you were using LMT, I'm sure that number would be greater based
on the larger number of DB blocks for the uniform size of the LMT.

However, it still only allocates ONE ILT for each block unless you
specify OTHERWISE.  Hence the documentation WOULD be right.

-----Original Message-----
From: Powell, Mark D [mailto:mark.powell@xxxxxxx]=20
Sent: Tuesday, March 22, 2005 12:11 PM
To: Hollis, Les; oracle-l@xxxxxxxxxxxxx
Subject: RE: enq: TX - index contention

 OK, there appears to be some question to how many ITL lists Oracle
allocates.  I made the statement that Oracle allocates 2 probably
starting
with version 9.

Ran on Oracle version 9.2.0.5 running on AIX 5.3

UT1 >
UT1 > drop table marktest;

Table dropped.

UT1 > create table marktest (
  2    fld1   varchar2(10)
  3   ,fld2  number
  4   ,fld3  date
  5  )
  6  tablespace usr
  7  initrans    1
  8  /

Table created.
-- I specified 1 transaction work list and dictionary shows 1

UT1 > select ini_trans from user_tables where table_name =3D 'MARKTEST'
  2  /

 INI_TRANS
----------
         1

UT1 > select file_id, block_id, blocks
  2  from   dba_extents
  3  where segment_name =3D 'MARKTEST'
  4  /

   FILE_ID   BLOCK_ID     BLOCKS
---------- ---------- ----------
        10         18          4

UT1 > spool off
-- However looking at the block dump you see 2 are allocated.
*** 2005-03-22 13:01:24.699
*** SESSION ID:(22.4090) 2005-03-22 13:01:24.693
Start dump data blocks tsn: 5 file#: 10 minblk 19 maxblk 19
buffer tsn: 5 rdba: 0x02800013 (10/19)
scn: 0x0001.f3774a80 seq: 0x01 flg: 0x06 tail: 0x4a800601
frmt: 0x02 chkval: 0x7458 type: 0x06=3Dtrans data
Block header dump:  0x02800013
 Object id on Block? Y
 seg/obj: 0x7a0d  csc: 0x01.ea1081a9  itc: 2  flg: O  typ: 1 - DATA
     fsl: 0  fnx: 0x0 ver: 0x01

 Itl           Xid                  Uba         Flag  Lck        Scn/Fsc
0x01   0x0005.01c.000227ae  0x0140264e.1310.18  --U-    1  fsc
0x0000.f3774a80
0x02   0x0005.01a.00022492  0x01403ca4.1304.01  C---    0  scn
0x0001.ea108193

data_block_dump,data header at 0x11027205c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
<snip>

-----Original Message-----
From: Hollis, Les [mailto:Les.Hollis@xxxxxx]=20
Sent: Tuesday, March 22, 2005 12:48 PM
To: Hollis, Les; mark.powell@xxxxxxx; oracle-l@xxxxxxxxxxxxx
Subject: RE: enq: TX - index contention

Addendum.....this is cut from the Database Fundamentals II training
course
from Oracle Education....Power Point Slides



INITRANS: Guarantees a minimum level of concurrency.  It defaults to 1
for a
data segment and 2 for an index segment, guarantees a minimum level of
concurrency. For example, if set to 3, INITRANS ensures that at least
three
transactions can concurrently make changes to the block. If necessary,
additional transaction slots can be allocated from the free space in the
block to permit more concurrent transactions to modify rows in the
block.



True in both the 9.0.1 release documentation AND in the 9.2.0.x
Documentation.

-----Original Message-----
From: Hollis, Les
Sent: Tuesday, March 22, 2005 11:32 AM
To: 'mark.powell@xxxxxxx'; oracle-l@xxxxxxxxxxxxx
Subject: RE: enq: TX - index contention

I think not.


SQL> create table junky1 (name varchar2(5));

Table created.

SQL> select ini_trans from user_tables where table_name =3D 'JUNKY1';


INI_TRANS
----------
         1





-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Powell, Mark D
Sent: Tuesday, March 22, 2005 10:19 AM
To: oracle-l@xxxxxxxxxxxxx
Subject: RE: enq: TX - index contention

I believe that the default number of initrans for a table has been
raised to
two as of version 9.0  =20

-- Mark D Powell --

-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx]
On Behalf Of K Gopalakrishnan
Sent: Tuesday, March 22, 2005 10:10 AM
To: stalinsk@xxxxxxxxx
Cc: oracle-l@xxxxxxxxxxxxx
Subject: Re: enq: TX - index contention

Stalin:

TX enqueue waits  with LMODE 4 can happen for the following reasons.
Quoting from 'Oracle Wait Interface'

"A wait for the TX enqueue in mode 4 is normally due to one of the
following
reasons:
ITL (interested transaction list) shortage Unique key enforcement Bitmap
index entry

Here, we will talk about the ITL, which is a transaction slot in a data
block. The initial number of ITL slots is defined by the INITRANS clause
and
is limited by the MAXTRANS clause. By default, a table has
1 ITL and an index has 2 ITLs. Each ITL takes up 24 bytes and contains
the
transaction ID in the format of USN.SLOT#.WRAP#. Every DML transaction
needs
to acquire its own ITL space within a block before data can be
manipulated.
Contention for ITL occurs when all the available ITLs within a block are
currently in use and there is not enough space in the PCTFREE area for
Oracle to dynamically allocate a new ITL slot. In this case, the session
will wait until one of the transactions is committed or rolled back, and
it
will reuse that ITL slot. ITL is like a building parking space. Everyone
who
drives to the building needs a parking space. If the parking lot is
full,
you have to circle the lot until someone leaves the building. "

So I would expect any of the above conditions in your case?   You may
want to query the V$segment_statistics for ITL waits to eliminate the
ITL
issue. If you have bitmap indexes, that should be one of the casues for
those excesive waits. The wait time is close to 3 seconds and I suspect
that
could be because of the bitmap index issue,
--=20

Best Regards,
K Gopalakrishnan
Co-Author: Oracle Wait Interface, Oracle Press 2004
http://www.amazon.com/exec/obidos/tg/detail/-/007222729X/
--

--
http://www.freelists.org/webpage/oracle-l

--
http://www.freelists.org/webpage/oracle-l

Other related posts: