Advertisement

09.17.2008 at 05:08AM PDT, ID: 23738169
[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.8

Slow Select Statement

Asked by a-tune in Oracle 10.x

Tags: , , ,

A SQL select statement is verry slow in an custom database.
The execution plan shows very hight cost for the operation. All tables are indexed and the statistics are corect. In all other cases the statement work well.
In the problem database a lot of records (600000) are deleted in the last days.

See the statement and the execution plan below.

Does anyone has an idea?

Thanks

Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
select RelProj2Spec.childid taskId,   
       sum(record.animalcount) as used   
       from BaseRelation RelProj2Task inner join 
             record
             on RelProj2Task.parentid = record.projectid inner join 
             BaseRelation Batch2Record  
             on record.id = Batch2Record.childId inner join 
             BatchTable
             on Batch2Record.parentid = BatchTable.id inner join
             activity  
             on Batchtable.id = activity.batchtechid  inner join  
             BaseTable BTProj2Task  
             on RelProj2Task.id = BTProj2Task.id
        where RelProj2Task.parentId = 4711 and   
              RelProj2Task.relationElementTypeId = 10 and   
              RelProj2Task.relationRecordStateId = 231 and   
              (relproj2Task.childid = activity.taskId or 
               relproj2Task.childid = activity.strainid) and   
              activity.sign = 0 and                                         
              activity.recordstateid = 231  and 
              BatchTable.recordstateid = 231 and
              record.typeId = 12 and   
              record.State = 'ACTIVE' and   
              record.startdate >= case when BTProj2Task.typeId = 1 
                                       then  to_date('1-Jan-1900') 
                                       else to_date('1-Jan-2008') end and   
              record.startdate  <= to_date('26-Aug-2008') and   
              record.recordStateId = 231 and   
              Batch2Record.relationElementTypeId = 77 and   
              Batch2Record.relationRecordStateId = 231 and
              BTProj2Task.elementTypeId = 10 and   
              BTProj2Task.recordStateId = 231 
        group by RelProj2Task.childid
Attachments:
 
csv file with the explain plan
 
[+][-]09.17.2008 at 05:21AM PDT, ID: 22497592

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.

 
[+][-]09.17.2008 at 05:23AM PDT, ID: 22497605

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.

 
[+][-]09.17.2008 at 05:23AM PDT, ID: 22497611

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.

 
[+][-]09.17.2008 at 05:31AM PDT, ID: 22497671

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.

 
[+][-]09.17.2008 at 05:37AM PDT, ID: 22497711

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.

 
[+][-]09.17.2008 at 06:17AM PDT, ID: 22498113

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.

 
[+][-]09.18.2008 at 11:27PM PDT, ID: 22518440

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.

 
[+][-]09.19.2008 at 05:55AM PDT, ID: 22520558

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.

 
[+][-]09.24.2008 at 11:12PM PDT, ID: 22566614

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.

 
[+][-]10.01.2008 at 09:50AM PDT, ID: 22616358

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 10.x
Tags: Oracle, Database 10 g, 10.2.0.1, SQL SELECT
Sign Up Now!
Solution Provided By: a-tune
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20081119-EE-VQP-49 / EE_QW_2_20070628