Temporary space needed to create a constraint

From: Peter Hitchman <pjhoraclel_at_gmail.com>
Date: Tue, 10 Jul 2012 16:58:52 +0100
Message-ID: <CAPMSPxMvW1pri9WQt+tZJuPX_6bfk_3_B670DBipRyPx=Jj_Mw_at_mail.gmail.com>

Oracle Enterprise Edition:
OS: RHL. Hi,
I have a table with 1.8 billion rows, on which I created a non unique index and now I am trying to add in a primary key constraint using that index. But I keep running out of temporary space. I assumed that the space needed to create the constraint would be the same as needed to create the index (which was around 160GB), but it appears that it needs double that.
I did a small test and found that the amount of temp space needed to create a PK in this circumstance was double that needed to create the index.

In my latest attempt I tried to uses a 1GB sort_area_size and it ran for longer but in the end exhausted alll the disk space I have.

Has anyone else experienced this and if so why does creating the constraint use so much more temp space than creating an index on the same columns?


Received on Tue Jul 10 2012 - 10:58:52 CDT

Original text of this message