This is the last part of a series about Constraint Optimization. In this post I’ll summarize the conclusions from the previous parts. When we add a constraint to an existing table, there are two aspects that are worth taking into consideration: duration and availability. Duration When the table contains a significant number of rows, adding […]
Adding a Unique Constraint in an Online Way
Note: unlike most of my posts, this one assumes using Enterprise Edition I have a table t and I want to add a unique constraint on one of its columns – c1. The Offline Way The straightforward and most simple way to do it is using a single alter table statement: SQL> alter table t […]
Fast but Offline, or Online but Slow?
The Constraint Optimization series: Part 1: Optimization of Check Constraint Creation Part 2: Optimization that Violates Data Integrity Part 3: Optimization of Foreign Key Constraint Creation Part 4: (Lack of) Optimization of Unique Constraint Creation Part 5: Adding a Column with a Default Value and a Constraint Part 6: Fast but Offline, or Online but […]