From: Jim Smith <jim@jimsmith.demon.co.uk>
Subject: Re: Altering char(2) to char(4) causing entire table rewrite?
Date: 1996/12/12
Message-ID: <4xjniRAGSEsyEwVM@jimsmith.demon.co.uk>#1/1
distribution: world
x-nntp-posting-host: jimsmith.demon.co.uk
references: <58nne5$r0r@falcon.inetnebr.com>
organization: At Home
mime-version: 1.0
newsgroups: comp.databases.oracle.server



In article <58nne5$r0r@falcon.inetnebr.com>, Michael Nolan
<nolan@inetnebr.com> writes
>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@inetnebr.com
CHAR fields are fixed length and are always padded out to the full
length with spaces. Your alter table is effectively doing

update tablea
set columna=columna||'  ';

Try using varchar2 instead, these are variable length and will not be
automatically padded
-- 
Jim Smith


