Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Designate the order of indexed fields in Select Expert

Status
Not open for further replies.

shannonlp

Technical User
Feb 9, 2006
163
US
Crystal XI/Oracle 9i

Is it possible to build a query using the Select Expert to designate the order of indexed fields?

Specifically, in my query

{ARCHIVE_TRANS.DATE_STAMP} >= DateTime (2004, 01, 01, 0, 0, 0) and
isNull ({ARCHIVE_TRANS.DOCUMENT_CLASS}) and
{ARCHIVE_TRANS.BILL_FLAG} = "Y" and
{ARCHIVE_TRANS.TRANS_REF_NO} like "APHS*"

ARCHIVE_TRANS.DATE_STAMP and {ARCHIVE_TRANS.TRANS_REF_NO} are indexed in Oracle. The other two fields are not. I want to have the query process ARCHIVE_TRANS.TRANS_REF_NO first, then ARCHIVE_TRANS.DATE_STAMP. Because I am retrieving a large amount of data (all instances since 1/1/2004), I am trying to build this query in an efficient manner. In its current form it hangs and takes at least 20+ minutes to run.

Thanks in advance for any help.

Shannon
 
Your query is located under Database->Show SQL Query.

You can manually enter SQL using the Add command listed under your datasource.

Otherwise youmight try flipping things around to get the WHERE clause in the order you want, I don'tknow how to overide what it does, but I tink that it generally processes in the order of the record seletion.

But check the SQL as you go along.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top