× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Rewrite is definitely worth a try.

Couple of years ago I rewrote some of my poorly performing statements using
IN clause to use a subquery with an EXISTS clause and gained tremendous
performance gains (don't hold me to this, query optimizer changes daily :)).

What happens underneath is that query is rewritten by the query optimizer.
If it comes up with same query as before, you've gained nothing. However,
if it comes up with something even slightly different, it COULD come up with
a totally different access plan.
Go for it, Joe.

Elvis

-----Original Message-----
Subject: RE: SQL Select Statement Woes

I wonder if using CTE could help. If he could filter the SCHDETAIL table
(12 million records) to eliminate rows BEFORE doing the joins and LIKE
clauses. The OP stated that without the LIKE, the select returned 25 rows,
of which 5 were returned with the LIKE.

The objective would be to eliminate rows BEFORE the like clause gets
evaluated....

Eric



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

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

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.