On Thu, Aug 13, 2015 at 1:35 PM, Stone, Joel <Joel.Stone@xxxxxxxxxx> wrote:
Yes there is a LF with a single primary unique key.

OK, that eliminates one possible problem. Darren brings up some more
"CQE vs. SQE" and "logical vs. index" issues. Assuming you have an
access path *that your query engine can use*, there should definitely
be a way to make the query run quickly.

One thing I noticed is that your query uses EXISTS. Now, I'm no SQL
expert, but EXISTS feels less "obviously optimizable" to me than IN,
especially since you have another WHERE inside your subselect. I would
have expressed your query as

select * from filePROD
where docid in
(select docid from fileFIX)

John Y.

This thread ...


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

This mailing list archive is Copyright 1997-2019 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].