Improve DDL operation performance (2 Merged) [message #577368] |
Thu, 14 February 2013 09:32 |
soft_doctor
Messages: 33 Registered: May 2010
|
Member |
|
|
Hi Team
We have a table emp_details with 23772889 records. Our requirement is to increase few of the columns size in the table emp_details. We are following the below alter statement which is taking around 2 hours of time.
ALTER TABLE emp_details
MODIFY
(
address char(90)
,department char(30)
)
/
Is there any way to improve the above query performance? Greatly appreciated if anyone has any ideas on how to speed this up. Thank you.
|
|
|
|
Re: Improve DDL operation performance [message #577371 is a reply to message #577370] |
Thu, 14 February 2013 09:46 |
cookiemonster
Messages: 13925 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Recreate the table with the correct sizes using create table as select.
It'll be a lot faster.
But if I was you I'd take this opportunity to change the datatype of those columns to varchar2.
You can increase the size of varchar2 columns instaneously.
char takes ages as it has to actually update the data in the column to add the extra spaces.
|
|
|