![]() ![]() And also an existing bit is used, INSTANT ADD/DROP DDL works fine on upgraded tables as well. ADD/DROP COLUMN" without doing a table rebuild. With this, it is easy to do " ALTER TABLE. ![]() And if this bit is set, then the record version number is stored in the record header. I've used this bit to indicate that the record has a row version. In the record header, there are 4 bits of metadata, "info-bits", in which one bit was unused. ADD/DROP COLUMN, all rows in the table are considered at row version 0. ![]() If table hasn't gone through any ALTER TABLE. The way this feature works is, a row is stamped with a "row version" which was the current row version in table metadata when this row was inserted. How Does it work?Ī new concept of row version is introduced in table metadata. Multiple columns can be ADD/DROP in a single ALTER TABLE STATEMENT. SyntaxĪLTER TABLE ADD COLUMN /, ALGORITHM=INSTANT ĪLTER TABLE DROP COLUMN, ALGORITHM=INSTANT ĪLGORITHM=INSTANT is optional here as, by default, all ADD/DROP columns are done with ALGORITHM=INSTANT. In other words, the time taken to ADD/DROP new/old column(s) to/from a table with 1 row would be the same as time taken to ADD/DROP new/old column(s) to/from a table having 100M rows. Therefore, ADD/DROP COLUMN operations aren't dependent on the table size anymore. " don't touch any row but update the metadata only". This design also follow the same idea i.e.
0 Comments
Leave a Reply. |