DB Version : 19c
In Oracle, is it always a good idea to index a foreign key column ?
Is the below mentioned reason the primary reason to index foreign keys in Oracle ?
"As a general rule, the need to define a foreign key implies that there will be SQL statements that require a join of the parent and child tables. Without a foreign key index, this SQL could not perform a nested loops join, and a more expensive sort merge join might be required"
select
cust_name, order_details
from
cust c,
ordor o,
where
c.cust_id = o.cust_id;
Source: http://www.dba-oracle.com/t_foreign_key_indexing.htm