I second this...well third it really since Mark Murphy posted it earlier...

Charles

On Thu, Aug 13, 2015 at 2:10 PM, John Yeung <gallium.arsenide@xxxxxxxxx>
wrote:

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 is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



This thread ...

Follow-Ups:
Replies:

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].