Home » RDBMS Server » Server Administration » Adding a Column -- Performance issues
Adding a Column -- Performance issues [message #146202] Wed, 09 November 2005 04:47 Go to next message
deepa_balu
Messages: 74
Registered: March 2005
Member
I have a Table with millions of data.
Indexes also exist on that table.
Now i want to add a Not null column to that table with default Data .


So what happens internally.

Each Data block will be modified to add that column data.
Will the indexes be internally rebuilt...
Will it take a long time..



Which one will be faster,,

1. adding a column or recreating the table and indexes.

2.Dropping the index, adding the column and creating the index

[Updated on: Wed, 09 November 2005 05:01]

Report message to a moderator

Re: Adding a Column -- Performance issues [message #146231 is a reply to message #146202] Wed, 09 November 2005 08:50 Go to previous message
Sanjay Bajracharya
Messages: 279
Registered: October 2001
Location: Florida
Senior Member
You need to provide a little more information ...

You said "millions of data" .. meaning 1 million ? 10 million ? more than 10 million rows ?

Just adding a column will take time and here are the steps

1. Add the column (NULLable at this time).
2. Insert a value (default value in this case).
3. make that column NOT NULL and also set a default value.

How readily can you load the millions of rows ?

Later.
--
Sanjay
Previous Topic: Default Date format set up values selection Oracle 9i/10g
Next Topic: find the deleted records
Goto Forum:
  


Current Time: Sat Jan 25 09:27:29 CST 2025