> On May 10, 12:39 am, "Michel Cadot" <micadot{at}altern{dot}org> wrote:
> > Adding a column is just an update in dictionary. It is immediate.
> > Filling the new column will take more time.
> > There will mey be not fragmentation but row migration after that
> > and a table reorganization may be useful (depending on how many
> > rows will migrate).
> > Regards
> > Michel
> well.. i takes not even a second to add a new column WITH a default
> value of 0 (through Toad) on 19M records table.
> Can you tell me some more about table reorganization? Do I have to
> worry about it or just leave it up to Oracle magic? :)
probably you had enough free space for "0" values. Once the zeros
start changing to larger values you may have to reorg the table.
you can do a reorg (online or offline).
On May 9, 7:36 pm, Joe <joe1
@tlen.pl> wrote:
> I have a pretty big table with 10 columns, most varchars2 (50).
> adding a new column to table that already have 19M records takes half
> a second (through Toad).
> question: how does oracle organize data inside table space, and does
> on should make any database defragmentation after adding additional
> column to allready so much filled-out table?
> thanks for help
Please read the concepts manual, row format and size is explained
there, as well as tablespace organization. Also, row chaining and
migration. You need to worry about the latter when you update rows
and they no longer fit in the block where they've been, as Michel and
Valentin have alluded to. There are scripts in your $ORACLE_HOME/
rdbms/admin directory called something like utlch*sql to determine if
this is a problem - search the docs for how to use those. After you
learn the concepts. There are also informative columns in dba_tables
and some other views. Be sure you understand PCTFREE and PCTUSED.
Fragmentation has a particular set of definitions with respect to
Oracle, and is generally not a problem. Certain things can happen
though, especially with mass deletes.
jg
--
@home.com is bogus. http://www.10zenmonkeys.com/2007/05/09/keith-henson-back-in-jail-spac...