non in-place alter
Posted in 2014
Topics: Installation, Setup & Upgrades
Hi, Guys,
IDS11.50FC8.
Apparently, 11.50 does not have in-place Alter capability.
I tested a table to alter a column from serial to serial8 ,
ALTER TABLE inv_source MODIFY inventory_id Serial8;
It has only 5 millions rows, but it take 6 minutes to finish. The bad is,
We have some tables around 100 millions of rows. It will take
unacceptable time to do this job...
Unfortunately, because of a ER bug of 11.70 we cannot use 11.70 to
get its in-place Alter features( we upgraded , but reverted back). At
this moment we must stich with 11.50 FC8.
Any comments or suggestions?
Thanks
Frank
--001a11339e58d35cf804f26383af
Hi,
maybe you should use a workaround: add a new int8 column, fill it in multiple
transactions
with the original value using a stored procedure and at the end rename the
columns and drop
the original one. We have done that in multiple cases to avoid too long locks
on the table.
Just an idea..
Marcus Haarmann
----- Ursprüngliche Mail -----
Von: "FRANK" <yunyaoqu@gmail.com>
An: ids@iiug.org
Gesendet: Freitag, 14. Februar 2014 21:18:57
Betreff: non in-place alter [32487]
Hi, Guys,
IDS11.50FC8.
Apparently, 11.50 does not have in-place Alter capability.
I tested a table to alter a column from serial to serial8 ,
ALTER TABLE inv_source MODIFY inventory_id Serial8;
It has only 5 millions rows, but it take 6 minutes to finish. The bad is,
We have some tables around 100 millions of rows. It will take
unacceptable time to do this job...
Unfortunately, because of a ER bug of 11.70 we cannot use 11.70 to
get its in-place Alter features( we upgraded , but reverted back). At
this moment we must stich with 11.50 FC8.
Any comments or suggestions?
Thanks
Frank
--001a11339e58d35cf804f26383af
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.