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: does unique constraints hurt insert performance

Re: does unique constraints hurt insert performance

From: Jim Kennedy <jim>
Date: Sun, 13 Aug 2006 22:57:11 -0700
Message-ID: <WZGdnWqZ7IFhkn3ZnZ2dnUVZ_s-dnZ2d@comcast.com>

"sunh11373" <sunh11373_at_gmail.com> wrote in message news:1155530719.206137.69360_at_b28g2000cwb.googlegroups.com...
> Jonathan Lewis wrote:
> >
> > There is a measure of truth in the comment. If you are inserting
> > using single-row processing, then each insert will have to pin
> > the index leaf blocks from root to leaf very briefly - which means
> > the root block will get hit very hard if these inserts are coming from
> > multiple concurrent processes and you are likely to see some latch
> > contention on the latch covering the root block. (PL/SQL is
> > a special case, though).
> >
> > If the data is arriving in an order that causes very random reads
> > of the index the latching is likely to be relatively insignificant
compared
> > to the possible physical read load.
> >
> > If the data is arriving in sorted order, then the time lost on buffer
> > busy waits on the leaf blocks is likely to be the major time waster.
> >
>
> Hi,
>
> Thanks, I think this is the answer I am looking for.
>
> BTW, in my case, we use PL/SQL (stored procedure called from Java). The
> data is inserted one row at a time and is very random.
> Make sure you use prepared statements or performance will be suboptimal.
Jim Received on Mon Aug 14 2006 - 00:57:11 CDT

Original text of this message

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