Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Insert performance

Re: Insert performance

From: Tanel Poder <>
Date: Tue, 23 Sep 2003 01:54:36 -0800
Message-ID: <>


Search for "surrogate key" in google for example. You have to modify your generated primary key values to not hit the same index blocks consecutively. For example, add another high-cardinality column to your primary key, or if using meaningless primary keys then just have your primary keys values to be spread over different value ranges (either by using two sequences, one is "main" seq, other is a "wrapping" cycling from 1 to 1000 for example - the result sequence would be wrapping seq * main seq, thus each insert is going to different part in index, other way would be using pre-generated primary key values).

Other way would be to hash-partition your tables and indexes to spread inserts over partitions, but I suggest you to get your design ok first.

Also, with lot's of concurrent inserts, you should increase the number of freelists for your tables to the number of concurrent inserts, also take a look to _bump_highwater_mark_count parameter and freelist groups when having really huge insert activity.


  Does anyone have any idea how to improve performance for multiple inserts into a table that uses a sequence generated primary key?

  I have approximately 6 concurrent inserts per second into this table which causes the primary key index to become a hot block. This in turn causes "buffer busy waits".

  I have increased initrans, but am not sure where to go from here

  Any ideas would be appreciated,


  Rick Stephenson

  Oracle Database Administrator

  Ovid Technologies, Inc.

  This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to which they are addressed. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, forwarding or otherwise distributing or taking any action in reliance on the contents of this information is strictly prohibited.


Please see the official ORACLE-L FAQ:

Author: Tanel Poder

Fat City Network Services    -- 858-538-5051
San Diego, California        -- Mailing list and web hosting services
To REMOVE yourself from this mailing list, send an E-Mail message to: (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Tue Sep 23 2003 - 04:54:36 CDT

Original text of this message