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 -> Re: Altering char(2) to char(4) causing entire table rewrite?

Re: Altering char(2) to char(4) causing entire table rewrite?

From: pat palguta <pat.palguta_at_daytonoh.ncr.com>
Date: 1996/12/16
Message-ID: <E2ItvB.H2F@falcon.daytonoh.ncr.com>#1/1

The CHAR datatype stores fixed length strings. So for the altered column in your situation, Oracle must re-allocate an additional 2 bytes for every row in the table, whether your using them or not.

You might consider using the VARCHAR2 datatype instead.

==========Michael Nolan, 12/11/96==========

I need to alter a char(2) field in a table to char(4). At present this column is null for all rows in the table (over 3 million rows, total table size around 300MB.)

However, when I attempt to make the change, it looks like it is rewriting every row in the table, because it is producing great quantities
of archive logs. This brings my production users to a grinding halt.

Is there any way around this, or am I going to have to schedule this modification to run over a weekend?

--
Mike Nolan
nolan_at_inetnebr.com
Received on Mon Dec 16 1996 - 00:00:00 CST

Original text of this message

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