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: Adding column is slow

Re: Adding column is slow

From: Tom Dyess <nospam_at_nospam.spm>
Date: Thu, 22 Aug 2002 13:44:14 -0400
Message-ID: <jo999.46535$842.13075@news1.fdn.com>


Look into alter table tablename nologging before your update then alter table logging before and after your update.

"Eduardo Tavares" <ejtavares_at_tmn.pt> wrote in message news:Xb699.428$v34.628804_at_newsserver.ip.pt...
> What i usually do when i havo to manipulate tables with such amount of
> records is to slice the updates in smaller pieces ...
> for example you can update 10000 rows and then commit (you can control
this
> with rowid ...) that way you dont need to worry about rollbacks ...
>
> The add column is instantaneous, the problem is the default clause ( wich
> makes an update ... and commits only at the end ... you'll need a lot of
> rollbacks )
>
> Hope this helps ...
>
> Eduardo Tavares
>
> "Peter Laursen" <ptl_at_edbgruppen.dk> wrote in message
> news:3d64c91c$0$43947$edfadb0f_at_dspool01.news.tele.dk...
> > Hi,
> >
> > System(s) 8.0.5 and 8.1.7 SE
> >
> > Adding a new column to a large table is taking hours. Its part of an
> update
> > that will be run at many customers. The table will contain approx 100M
> rows.
> > The table has 5 number fields and a date field. A new 'number(1) default
> 0'
> > is beeing added
> > Assuming the update will run as the only user connected what could be
done
> > to speed up things?
> > Will any of the following help: Disabling triggers? Disabling
constraints?
> > Dropping indexes and rebuilding?
> >
> > Also how do I calculate the how much rollback space is needed?
> >
> > TIA
> > Peter Laursen
> >
> >
> >
> >
>
>
Received on Thu Aug 22 2002 - 12:44:14 CDT

Original text of this message

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