Advertisement

11.05.2004 at 08:27AM PST, ID: 21196167
[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!

6.6

Slow query...

Asked by dankennedy in Oracle Database

Tags: ,

Hi,
I have a slow query problem...

The query is basically like...

SELECT A.Blah, B.Stuff
FROM TABLE1 A,
(SELECT MAX(C.StringValue) FROM TABLE2 C,TABLE3 D WHERE GROUP BY D.IDVal) B
WHERE A.Blah > 3
GROUP BY
A.Blah
B.Stuff
ORDER BY
A.Blah

It's the sub query that's causing the problem, when I take out the subquery, it runs fine, if I run the subquery on it's own, it runs fine, but the two together take up to 60 seconds to return 243 rows... Here's the execution path...

call     count       cpu    elapsed       disk      query    current        rows
------- ------  -------- ---------- ---------- ---------- ----------  ----------
Parse        1      0.01       0.01          0          0          0           0
Execute      1      0.00       0.00          0          0          0           0
Fetch       21     60.57      60.58       3917     198287         11         293
------- ------  -------- ---------- ---------- ---------- ----------  ----------
total       23     60.58      60.59       3917     198287         11         293
 
Misses in library cache during parse: 1
Optimizer goal: CHOOSE
Parsing user id: 43
 
Rows     Row Source Operation
-------  ---------------------------------------------------
    293  SORT GROUP BY
   1170   NESTED LOOPS
   1171    NESTED LOOPS
   1171     NESTED LOOPS
  34285      NESTED LOOPS
  34285       NESTED LOOPS
    294        VIEW
    294         SORT GROUP BY
   1170          MERGE JOIN
    249           SORT JOIN
    248            TABLE ACCESS FULL TABLE2
   1170           SORT JOIN
   1170            TABLE ACCESS FULL TABLE3
  34577        TABLE ACCESS BY INDEX ROWID TABLE3
  34577         INDEX RANGE SCAN (object id 3145)
  68568       TABLE ACCESS BY INDEX ROWID TABLE2
  68568        INDEX UNIQUE SCAN (object id 3034)
  35454      TABLE ACCESS BY INDEX ROWID TABLE1
  35454       INDEX UNIQUE SCAN (object id 3201)
   2340     TABLE ACCESS BY INDEX ROWID TABLE4
   2340      INDEX UNIQUE SCAN (object id 3031)
   1170    TABLE ACCESS BY INDEX ROWID TABLE5
   2340     INDEX UNIQUE SCAN (object id 3165)
 
********************************************************************************
 
Can anyone see what I'm missing here? I think I just need to use that subquery differently...Start Free Trial
[+][-]11.05.2004 at 08:35AM PST, ID: 12506125

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.05.2004 at 08:37AM PST, ID: 12506148

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.05.2004 at 08:42AM PST, ID: 12506209

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.05.2004 at 08:51AM PST, ID: 12506290

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.05.2004 at 08:53AM PST, ID: 12506319

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.05.2004 at 09:46AM PST, ID: 12506915

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.05.2004 at 10:13AM PST, ID: 12507184

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.05.2004 at 10:16AM PST, ID: 12507212

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.05.2004 at 10:42AM PST, ID: 12507408

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.05.2004 at 10:51AM PST, ID: 12507488

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.05.2004 at 01:16PM PST, ID: 12508876

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.05.2004 at 01:18PM PST, ID: 12508892

View this solution now by starting your 7-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

Zone: Oracle Database
Tags: slow, query
Sign Up Now!
Solution Provided By: morphman
Participating Experts: 4
Solution Grade: A
 
 
[+][-]11.05.2004 at 01:19PM PST, ID: 12508896

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.05.2004 at 01:25PM PST, ID: 12508966

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.05.2004 at 01:26PM PST, ID: 12508970

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.05.2004 at 01:33PM PST, ID: 12509052

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.06.2004 at 08:39AM PST, ID: 12513592

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.07.2004 at 05:00AM PST, ID: 12517076

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.11.2004 at 06:22AM PST, ID: 12554858

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32