How is the ALTER TABLE statement treated by DBMaker internally? (From DBMR1740)

~ 0 min
2016-03-07 11:13

1. Before DBMaker 4.1x (include 4.1x) series, 'ALTER TABLE' statement should copy another internal table (select into), so it occupies double disk space and writes into journal (please take care journal full problem).

 2. After DBMaker 4.2x (include 4.2x) series, only add ONE column in the tail of table and default value is null can go smart flow (just modify table schema, table data doesn't any reference for DB) to ALTER TABLE. Besides this case, all of 'ALTER TABLE' SQL commands also need to occupy double disk space and write journal file (also take care journal full issue).

 3. The method flow is: Create a new internal table -> select from modified source table into new internal table -> drop modified table -> rename new internal table -> mark internal table to public.

 4. SELECT...INTO will write journal file also, it will take huge journal file space. Before execute 'ALTER TABLE' with a huge data table, please check journal file is enough.

Average rating 0 (0 Votes)

You cannot comment on this entry

Tags