Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Reducing scale/precision with exp/imp?
One thing we'd like to do during an upgrade is reduce the scale and
precision of a couple columns which contain data. There are 2 tables with 3
columns 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.
Importing into the precreated table rounds the precision off just like you would expect. Unfortunately, it more than doubles the import time (since this is by far the largest table), which is why I ask the question. Is there a quicker way to reduce the scale/precision of a column?
I know I can't use alter table so the only other way I can think of is 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.
Shalom,
Michael Ray
-- http://www.freelists.org/webpage/oracle-lReceived on Wed Feb 08 2006 - 07:16:27 CST
![]() |
![]() |