RE: Creating unique index on huge table.
Date: Fri, 23 Sep 2016 03:50:38 +0000
Message-ID: <2FE2AA1C5F8DEC478F58DF8DD32BA6370CEF9314_at_HKWPIPXMB03C.zone1.scb.net>
I think you missed the REBUILD in the
Hemant K Chitale
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Tim Gorman
Sent: Friday, September 23, 2016 7:32 AM
To: vkeylis2009_at_gmail.com; oracle-l_at_freelists.org
Subject: Re: Creating unique index on huge table.
Vadim,
Several years ago, I accidentally dropped a unique index on a 55TB table, which represented about 12TB of index. There are several on this list who know exactly the circumstances, and one person on this list who was the recipient of the tearful phone call I made when I realized what I had done. :)
High-level description of what worked to rebuild it...
We ordered the SQL*Plus calls inside the shell-script so that the partitions for the most-recent partitions (i.e. the table was partitioned by a DATE column) were populated first, and then let the builds progress back in time. Depending on the application, you can be doing some or all of the normal activities on the table. Our assumption (which proved correct) was that all DML occurs against the newest partitions, so those were the partitions that needed to be made "usable" first.
This approach won't eliminate downtime or performance problems, but it will likely minimize them.
I hope this makes sense?
Thanks!
-Tim
On 9/22/16 15:43, Vadim Keylis wrote:
I have couple 5T highly transactional partition tables. I need to add a partition unique index to these tables without causing any outage or incurring performance hit. Will greatly appreciate suggestions on the best approach to do it.
Thanks so much,
This email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please delete all copies and notify the sender immediately. You may wish to refer to the incorporation details of Standard Chartered PLC, Standard Chartered Bank and their subsidiaries at https://www.sc.com/en/incorporation-details.html
alter index <index-name> partition <partition-name> parallel <degree> nologging compute statistics
What is scary is that this is a UNIQUE Index.
I am working on adding replication using third party tool(dbvisit) to our databases.
Vadim
[https://ssl.gstatic.com/ui/v1/icons/mail/images/cleardot.gif]
--
http://www.freelists.org/webpage/oracle-l
Received on Fri Sep 23 2016 - 05:50:38 CEST