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: DA Morgan <damorgan_at_psoug.org>
Date: Sun, 13 Aug 2006 09:50:55 -0700
Message-ID: <1155487856.226619@bubbleator.drizzle.com>


sunh11373_at_gmail.com wrote:
> Hi,
>
> If I have a table which has 1 billion rows (data in each row is
> relatively small), delcare one column (not the primary key column) as
> unique, will this cause big problem for inserting?
> Assume the inserting rate is 500/sec and the possible duplication is
> 0.001%.
>
> Thanks

Oracle version number?
Partitioning option?
Local or global index?

Rather than doing ALTER TABLE ADD CONSTRAINT ... use the DBMS_REDEFINITION built-in package. There is a demo in Morgan's Library at www.psoug.org.

But definitely try it first on a test box.

Also: You might want to run DBMS_SPACE.CREATE_INDEX_COST first to determine the space impact. There is a demo of this in the library as well.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Sun Aug 13 2006 - 11:50:55 CDT

Original text of this message

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