Oracle performance schema changes compared to MySQL ALTER TABLE?

When using MySQL MyISAM tables and writing out an ALTER TABLE statement to add a column, MySQL creates a temporary table and copies all the data into a new table before overwriting the original table.

If there is a lot of data in this table, this process can be very slow (especially when restoring indexes) and requires that there is enough free disk space to store 2 copies of the table. This is very annoying.

How does Oracle work when adding columns? Is it fast on large tables?

I am always interested in the possibility of changing the circuit without a lot of downtime. We always add new features to our software that require a change of circuit with each version. Any advice is appreciated ...

+3
source share
2 answers

Adding a column without data to a large table in Oracle is usually very fast. There is no temporary copy of the data and there is no need to rebuild the indexes. Slowing usually occurs when you want to add a column to a large table and fill the data in this new column for all existing rows, since now you are talking about the UPDATE statement, which affects a large number of rows.

. , 80% 4 , , 30% , , Oracle 4 . , , , -. , , , , , , , . - , , , , . , , , , , PCTFREE .

+6

, ( DDL) . Oracle - oobjects DBMS_REDEFINITION, - .

+2

Source: https://habr.com/ru/post/1704243/


All Articles