Q
Problem solve Get help with specific problems with your technologies, process and projects.

Alter table or drop old table and create new?

Our development staff is changing the structure of an Oracle database and needs to add fields to tables that already have data populated in them. As far as fragmentation, is it better to do an "ALTER TABLE" or to create a temp table, drop the old and create a new?

Our development staff is changing the structure of an Oracle database and needs to add fields to tables that already have data populated in them. They are using Oracle 9i R2 and 10g. As far as fragmentation, is it better to do an "ALTER TABLE" or to create a temp table, drop the old and create a new?
Depending on the amount of free space in each database block, adding columns could cause row chaining if there's not enough free space to accommodate the new column data. As row chaining is detrimental to performance, to be safe you might want to use the second option.

Dig Deeper on Oracle database performance problems and tuning

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close