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/