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 -> Rebuilding a table with smaller columns

Rebuilding a table with smaller columns

From: Michael Ray <Ihatespam_at_indy.net>
Date: Sun, 05 Feb 2006 22:04:26 GMT
Message-ID: <Xns9761ADB3BBBB3topshotindynet@199.45.49.11>


One thing we'd like to do during an upgrade is reduce the scale and precision of a couple columns. There are 2 tables that make up 90% of the data, both of which have a column of number (12,7), which is much greater than required. If I precreate these tables with a column of number(7,3), the data goes in fine, but the import takes MUCH longer than if we use the original definition.

Would it be quicker to do a normal import then create a new table with the smaller column, copy the data over, drop the old and rename the new? I'm guessing that whatver processing Oracle is doing to round this data off will take the same amount of time regardless of which method I use. Plus then I have to deal with making sure all the indexes, constraints and rights are in order for the new table.

Essentially, I want to know what is the fastest method to reduce the scale and precision of a column since we don't know how much downtime we'll have. Since we were already doing an upgrade (8i to 10g) we thought we'd save some space at the same time. Received on Sun Feb 05 2006 - 16:04:26 CST

Original text of this message

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