Advertisement

10.30.2007 at 07:04AM PDT, ID: 22926864
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.6

Oracle 9i 3 Table join script optimization

Asked by aliasim99 in Oracle 9.x, Oracle Database, SQL Query Syntax

Tags: , , , ,

I have a query that is taking 11 seconds to run. I want to bring this down as much as possible. I havea pretty good machine with 2GB RAM.. everything just flies but this one is very slow. My query works for SQL server and Oracle. I can Use an Oracle only query too with Inner out joins, Ifact I tried an inner join but still talking 11 seconds. Could someone please tell me how I can optimizae this query? Application_trackpoint table has 90,000 records and EDI_trackpoint hase 129,000 records.

A quicke note. .. if I remove "ABC_APPLICATION_TRACKPOINT.DOC_REFERENCE_NUMBER='21032300'
OR
"

the query takes 2 Seconds

If I remove
"OR
ABC_EDI_TRACKPOINT.DOC_REFERENCE_NUMBER='21032300'"

the query takes 10 seconds.

APPLICATION_TRACKPOINT table has 3 and EDI_TRACKPOINT has 2 records for this DOC_REFERENCE NUMBER.

Select  

DISTINCT
ABC_TRACKING_SUMMARY.TRACKING_ID,
ABC_TRACKING_SUMMARY.TRACKING_STATE,
ABC_TRACKING_SUMMARY.SENDER_ID,
ABC_TRACKING_SUMMARY.RECEIVER_ID,
ABC_TRACKING_SUMMARY.TRANSACTION_TYPE,
ABC_TRACKING_SUMMARY.DOC_REFERENCE_NUMBER,
TO_CHAR(ABC_TRACKING_SUMMARY.TRACKING_START_TIME,'YYYY-MON-DD HH12:MI:SSSSS AM') as THE_START_TIME,
TO_CHAR(ABC_TRACKING_SUMMARY.TRACKING_END_TIME,'YYYY-Mon-dd HH12:MI:SSSSS AM') as TRACKING_END_TIME,
TO_CHAR(ABC_TRACKING_SUMMARY.TRACKING_PURGE_TIME,'YYYY-Mon-dd HH12:MI:SSSSS AM') as TRACKING_PURGE_TIME,
ABC_TRACKING_SUMMARY.TRACKING_RECORD_OWNER,
ABC_TRACKING_SUMMARY.ACCESS_CODE

from ABC_TRACKING_SUMMARY, ABC_APPLICATION_TRACKPOINT, ABC_EDI_TRACKPOINT
WHERE (ABC_APPLICATION_TRACKPOINT.DOC_REFERENCE_NUMBER='21032300'
OR
ABC_EDI_TRACKPOINT.DOC_REFERENCE_NUMBER='21032300')

AND ABC_APPLICATION_TRACKPOINT.DOC_REFERENCE_NUMBER = ABC_TRACKING_SUMMARY.DOC_REFERENCE_NUMBER
AND ABC_APPLICATION_TRACKPOINT.TRACKING_ID = ABC_TRACKING_SUMMARY.TRACKING_ID
AND ABC_EDI_TRACKPOINT.DOC_REFERENCE_NUMBER = ABC_TRACKING_SUMMARY.DOC_REFERENCE_NUMBER
AND ABC_EDI_TRACKPOINT.TRACKING_ID = ABC_TRACKING_SUMMARY.TRACKING_ID
Start Free Trial
[+][-]10.30.2007 at 07:18AM PDT, ID: 20177342

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.30.2007 at 07:19AM PDT, ID: 20177356

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.30.2007 at 08:35AM PDT, ID: 20178162

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.30.2007 at 09:26AM PDT, ID: 20178702

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.30.2007 at 09:42AM PDT, ID: 20178847

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.30.2007 at 11:19PM PDT, ID: 20183158

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.08.2007 at 11:06AM PST, ID: 20244048

View this solution now by starting your 14-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Oracle 9.x, Oracle Database, SQL Query Syntax
Tags: table, 3, join, 9i, scripts
Sign Up Now!
Solution Provided By: JuozasV
Participating Experts: 4
Solution Grade: A
 
 
[+][-]11.08.2007 at 12:38PM PST, ID: 20244906

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-43 / EE_QW_2_20070628