Foreign key: auto-create index for it?
Posted in 2000
Topics: Triggers, Constraints & Referential Integrity
I've been told that Sybase ASA automatically creates an index in the referring table for all declared foreign key constraints. Does Oracle do likewise? DB2 and MS SQL Server both require explicit creation of indexes to support foreign keys. I'm wondering if Oracle is more like them.
Er, I meant to say "Informix" below, not "Oracle". Sorry about that. In news:<MPG.13e5317d51eba6a8989847@news.onlynews.com>, rgparker@west.net says... > I've been told that Sybase ASA automatically creates an index in the > referring table for all declared foreign key constraints. Does Oracle do > likewise? > > DB2 and MS SQL Server both require explicit creation of indexes to > support foreign keys. I'm wondering if Oracle is more like them. > >
We automatically create the index. If there is already an index in which the column is the first column in the index, then that index will be used instead. Randall Parker wrote: > Er, > > I meant to say "Informix" below, not "Oracle". Sorry about that. > > In news:<MPG.13e5317d51eba6a8989847@news.onlynews.com>, rgparker@west.net > says... > > I've been told that Sybase ASA automatically creates an index in the > > referring table for all declared foreign key constraints. Does Oracle do > > likewise? > > > > DB2 and MS SQL Server both require explicit creation of indexes to > > support foreign keys. I'm wondering if Oracle is more like them. > > > >