Clarify myths of indexing foreign key constraints on Oracle-DB
If you use foreign keys there’s one very common dogma: You always need to index all the column(s) for which you define a foreign key constraint! I definitely do not agree with this dogma and want to explain why. There are two reasons for indexing columns with foreign key constraints: Avoiding full table scans on referencing table during deletes on referenced tables Avoiding blocking lock problems e.g. if you are doing DML on both referencing and referenced table You may find a detailed description of the locking behaviour of foreign keys at chapter "Locks and Foreign Keys" here in the Oracle documentation . Considerations on full table scan due to foreign key constraint not protected by index If you do not index referencing column(s) than delete on referenced table leads to a full table scan on referencing table for every deleted row Therefore you should index referencing column(s) especially in OLTP-environments if your referenced table has more than a s...