[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[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.4

Slow Query Performance: Root cause may be table setup

Asked by AWarrenM in Oracle 10.x

Tags: Oracle, 10g, 10.1, Using SQL Developer

Good Morning All (well depending on when you read this):

Typically in the past, I've had people create the Oracle tables for me and I just interact with them. The current project I've had to, so I think therin lies the problem of my issue. Let me generically explain the setup:

t_request: id (pk), pers_id_requester (fk), pers_id_reqFor (fk), cur_title (fk), future_title (fk), status (fk), various other attributes for table

t_pers: id (pk), name

t_titles: id (pk), name

t_status: id (pk), name

All id's are NUMBERs and all Names are VARCHAR2, 256 BYTEs.

So the query below is taking 1.5 -2 seconds to run initially when t_request has 80 records, t_pers has 30, and the remaining have less than 15; prior to being cached obviously

SELECT r.title, r.request_date, requester.name, emp.name, cur.name, fut.name, stat.name
FROM t_request r, t_pers requester, t_pers emp, t_title cur, t_title fut, t_status stat
WHERE r.pers_id_requester = requester.id AND r.pers_id_reqFor = emp.id
      AND r.cur_title = cur.id AND r.future_title = fut.id
      AND r.status = stat.id AND r.name = 'Sample Name'
ORDER BY r.request_date;

So what that means is that anytime someone intially comes into view this information (it's the default query) they'll have at least a 1.5s wait time; that's way too high for less than 50 records being returned. I also have another query that takes less than .02s run that I'm joining this query; together they take 4-5s to run. So I split the queries down and saw this was the problem one. So actually once I join the two, it increases the wait time significantly when first run.

I'm assuming that the pk -> fk indexes are wokring as they should; however I turned on  AUTOTRACE and I all the joins are hash joins with a cost varying from 10 -27 and I also see an identical amount of 'TABLE ACCES FULL' operations. That doesn't seem right.

So I'm looking at the query and it's pretty straight forward, and that's why I'm thinking it has to do with the way the tables are setup; help, guidance, tips are much appreciated. Or even links to some doco would be helpful as well.. I just can't seem to find any searching; it seems that all the good stuff is probably buried 15 pages deeps in a Google search once you get past the sites that want to train you...

Thanks in Advance
[+][-]02/10/08 09:33 AM, ID: 20861739Accepted Solution

View this solution now by starting your 30-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, 10g, 10.1, Using SQL Developer
Sign Up Now!
Solution Provided By: angelIII
Participating Experts: 1
Solution Grade: A
 
[+][-]02/09/08 08:43 AM, ID: 20857847Expert Comment

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

 
[+][-]02/09/08 10:42 AM, ID: 20858190Author Comment

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

 
[+][-]02/09/08 11:40 AM, ID: 20858388Expert Comment

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

 
[+][-]02/09/08 11:49 AM, ID: 20858410Author Comment

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

 
[+][-]02/09/08 11:52 AM, ID: 20858419Expert Comment

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

 
[+][-]02/09/08 01:05 PM, ID: 20858676Author Comment

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

 
[+][-]02/09/08 01:20 PM, ID: 20858737Expert Comment

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

 
[+][-]02/09/08 01:30 PM, ID: 20858772Author Comment

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

 
[+][-]02/09/08 01:34 PM, ID: 20858787Expert Comment

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

 
[+][-]02/09/08 01:44 PM, ID: 20858818Author Comment

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

 
[+][-]02/09/08 01:49 PM, ID: 20858839Expert Comment

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

 
[+][-]02/09/08 03:39 PM, ID: 20859232Author Comment

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

 
[+][-]02/09/08 11:27 PM, ID: 20860428Expert Comment

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

 
[+][-]02/10/08 09:11 AM, ID: 20861673Author Comment

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

 
[+][-]02/10/08 09:52 AM, ID: 20861795Author Comment

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

 
[+][-]02/10/08 10:57 AM, ID: 20862028Expert Comment

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

 
[+][-]02/10/08 11:17 AM, ID: 20862113Author Comment

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

 
 
Loading Advertisement...
20091111-EE-VQP-92 / EE_QW_2_20070628