| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Subquery in constraints...
Mikito Harakiri wrote:
> Suppose you implement foreign key constraint as a subquery in the check
> constraint clause. Would the DBMS be smart enough to leverage existing index
> on the parent_id column?
What is so difficult about it? Checking if parent record exist is just a [recursive] query. SQL optimiser must be perfectly able to decide whether to use index or not. Received on Mon Oct 11 2004 - 14:38:57 CDT
![]() |
![]() |