dbTalk Databases Forums  

Should one include partitioning key column as first column ofnon-unique local index

comp.databases.oracle.server comp.databases.oracle.server


Discuss Should one include partitioning key column as first column ofnon-unique local index in the comp.databases.oracle.server forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Robert Klemme
 
Posts: n/a

Default Re: Should one include partitioning key column as first column ofnon-unique local index - 08-17-2011 , 04:00 AM






On 17.08.2011 09:35, vsevolod afanassiev wrote:
Quote:
OK, found Metalink Note 312843.1. The only way to compress partitioned
index is to drop and rebuild. Great.
Maybe DBMS_REDEFINITION can help. It's certainly not an easy operation
though.
http://download.oracle.com/docs/cd/B...i.htm#CBBJJAIF

One way could be to copy the table (with partitions), create the
compressed index on the copy and swap both tables with DBMS_REDEFINITION.

Kind regards

robert

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

Reply With Quote
  #12  
Old   
Robert Klemme
 
Posts: n/a

Default Re: Should one include partitioning key column as first column ofnon-unique local index - 08-17-2011 , 08:49 AM






On 17.08.2011 11:00, Robert Klemme wrote:
Quote:
On 17.08.2011 09:35, vsevolod afanassiev wrote:
OK, found Metalink Note 312843.1. The only way to compress partitioned
index is to drop and rebuild. Great.

Maybe DBMS_REDEFINITION can help. It's certainly not an easy operation
though.
http://download.oracle.com/docs/cd/B...i.htm#CBBJJAIF


One way could be to copy the table (with partitions), create the
compressed index on the copy and swap both tables with DBMS_REDEFINITION.
Works like a charm: https://gist.github.com/1151539

I split up the script in two because I did not want to fiddle with
permissions too much because DBMS_REDEFINITION needs quite a few of them:

http://download.oracle.com/docs/cd/B...s.htm#i1006801

So I simply switched to SYS for the redefinition.

Downside is of course that you need at least twice the space temporarily
but at least downtime isn't too big with large tables.

Kind regards

robert

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.