Am I missing something here?

You have a query

select * from filePROD
where exists
(select docid from fileFIX
where filePROD.docid = .fileFIX.docid)

which you are running as a Correlated Sub query which forces the operating
system to read through record by record looking for a match.

Couldn't you simply do a

Select docid from FilePROD
Where docid in(Select t1.docid
From FilePROD t1
Inner Join FileFix t2
on t1.DocId = t2.DocId)

The operating system should run the inter query first and get a list of
matches and then run the outer query one by one for the results.

I ran the same thing on my system and ran it through Visual Explain and
that is exactly what it did.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].