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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: suggestion, narrow record causing enqueue lock on table

RE: suggestion, narrow record causing enqueue lock on table

From: Powell, Mark D <mark.powell_at_eds.com>
Date: Fri, 25 Feb 2005 08:46:46 -0500
Message-ID: <5A14AF34CFF8AD44A44891F7C9FF410511E7BD@usahm236.amer.corp.eds.com>


You could recreate the table using a larger pctfree to reduce the number of rows that will be inserted into one block and you can set the initrans parameter up so that you can guarantee N number of itl slots are available in each block so that the structure can support concurrent access to every row in the block.

Depending on exactly what the function these rows perform in your application you might also be able to convert the table updates into being performed as part of an anonymous transaction to reduce the amount of time the locks on these rows are held unless the rows being locked is part of the strategy. In this last case I would look at Oracle user locks provided via the dbms_lock package.

HTH -- Mark D Powell --

-----Original Message-----

From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org]On Behalf Of Lex de Haan Sent: Friday, February 25, 2005 5:08 AM
To: GLeonard_at_wesbank.co.za; 'Oracle-L (E-mail)' Cc: 'Desplace, Laura'
Subject: RE: suggestion, narrow record causing enqueue lock on table

Hi George,
create the table, insert a few rows, and then issue "alter table ... minimize
records_per_block".
from that point onwards, Oracle will only store that number of rows per block,
regardless the block/row sizes.
another question: do you *really* need to track all those actions in a table?

kind regards,

Lex.  



Visit my website at http://www.naturaljoin.nl

-----Original Message-----

From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On
Behalf Of Leonard, George
Sent: Friday, February 25, 2005 10:45
To: Oracle-L (E-mail)
Cc: Desplace, Laura
Subject: suggestion, narrow record causing enqueue lock on table

Hi all  

Got a record that got a average row length of 46 Bytes.  

This is basically a record of which records the user is currently editing/accessing in table called user_events.  

Ever user that enters a form either inserts into user_events or deletes from it,  

Record being very narrow and average record count being <500 ends up in the situation that all records are within a single block,  

Now getting 1000 users coming and going all inserting and deleting from this table ends up with a pretty hot block,  

Suggestions,  

One idea was to change block size from 8K to 2K but still going to leave a lot
of records in a single block  

George



George Leonard
Oracle Database Administrator
New Dawn Technologies @ Wesbank
E-mail:gleonard_at_wesbank.co.za  

You Have The Obligation to Inform One Honestly of the risk, And As a Person You
Are Committed to Educate Yourself to the Total Risk In Any Activity! Once Informed & Totally Aware of the Risk, Every Fool Has the Right to Kill or
Injure Themselves as They See Fit!    




The views expressed in this email are, unless otherwise stated, those of the author and not those of the FirstRand Banking Group an Authorised Financial Service Provider or its management.
The information in this e-mail is confidential and is intended solely for the
addressee.
Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or
any action taken or omitted in reliance on this, is prohibited and may be unlawful.
Whilst all reasonable steps are taken to ensure the accuracy and integrity of
information and data transmitted electronically and to preserve the confidentiality thereof, no liability or responsibility whatsoever is accepted
if information or data is, for whatever reason, corrupted or does not reach its
intended destination.


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



--
http://www.freelists.org/webpage/oracle-l
--
http://www.freelists.org/webpage/oracle-l
Received on Fri Feb 25 2005 - 08:50:12 CST

Original text of this message

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