Advertisement

10.01.2005 at 01:42PM PDT, ID: 21580840
[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.2

SQL  TUNING

Asked by jkopoku in Databases Miscellaneous

Tags: , , , ,

Hello Everyone,
I have included the explain plan to this query which is taking more than 15 min to execute. The BILL table has over 90,000,000 records, and the CHARGE has over 75,000,000. I have tried to let the query use an index on the CHARGE table, but it always performs a full index scan.

Can some one please help me?

SELECT  BI.BAN ||'|'||CH.SUBSCRIBER_NO
||'|'||CH.SOC
||'|'||LTRIM(RTRIM(CH.FTR_REVENUE_CODE)) ||'|'||'&&2' ||'|'||CH.ACTV_AMT ||'|'||CH.ENT_SEQ_NO
FROM     BILL BI, CHARGE CH
WHERE  BI.BAN = CH.BAN
AND    BI.BILL_SEQ_NO = CH.ACTV_BILL_SEQ_NO
AND    CH.FTR_REVENUE_CODE IN ('R', 'U')
AND    CH.RATE_GROUP = 'P'
AND    (TO_CHAR(BI.BILL_STATUS_DATE,'YYYYMMDD')  = '&&2' OR TO_CHAR(BI.BILL_STATUS_DATE + 1,'YYYYMMDD')  = '&&2')
AND    TO_CHAR(BI.SYS_UPDATE_DATE,'YYYYMMDD') = '&&2'
AND    BI.BILL_CONF_STATUS = 'C'


Execution Plan
----------------------------------------------------------
   0      SELECT STATEMENT Optimizer=CHOOSE (Cost=40355 Card=322 Bytes
          =23506)

   1    0   NESTED LOOPS* (Cost=40355 Card=322 Bytes=23506)            :Q290100
                                                                       0

   2    1     TABLE ACCESS* (FULL) OF 'CHARGE' (Cost=27590 Card=340368 :Q290100
          0 Bytes=149761920)                                           0

   3    1     TABLE ACCESS* (BY INDEX ROWID) OF 'BILL' (Cost=2 Card=1  :Q290100
          Bytes=29)                                                    0

   4    3       INDEX* (UNIQUE SCAN) OF 'BILL_PK' (UNIQUE) (Cost=2 Car :Q290100
          d=1)                                                         0



   1 PARALLEL_TO_SERIAL            SELECT /*+ ORDERED NO_EXPAND USE_NL(A2) INDE
                                   X(A2 "BILL_PK") */ A1.C0,A1.C1,A1.C2

   2 PARALLEL_COMBINED_WITH_PARENT
   3 PARALLEL_COMBINED_WITH_PARENT
   4 PARALLEL_COMBINED_WITH_PARENTStart Free Trial
[+][-]10.01.2005 at 01:49PM PDT, ID: 14999772

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.

 
[+][-]10.01.2005 at 02:34PM PDT, ID: 14999870

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.2005 at 02:48PM PDT, ID: 14999903

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.

 
[+][-]10.01.2005 at 02:51PM PDT, ID: 14999914

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.2005 at 02:57PM PDT, ID: 14999931

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.

 
[+][-]10.01.2005 at 02:58PM PDT, ID: 14999933

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.

 
[+][-]10.01.2005 at 03:10PM PDT, ID: 14999956

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.2005 at 03:12PM PDT, ID: 14999962

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.

 
[+][-]10.01.2005 at 03:28PM PDT, ID: 15000008

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.02.2005 at 08:30PM PDT, ID: 15004197

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.

 
[+][-]10.03.2005 at 07:15AM PDT, ID: 15006598

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.03.2005 at 06:02PM PDT, ID: 15010964

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.

 
[+][-]10.05.2005 at 08:10AM PDT, ID: 15022549

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.05.2005 at 06:11PM PDT, ID: 15027360

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.

 
[+][-]10.06.2005 at 07:34AM PDT, ID: 15030852

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.06.2005 at 07:19PM PDT, ID: 15035705

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.

 
[+][-]10.06.2005 at 07:29PM PDT, ID: 15035736

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: Databases Miscellaneous
Tags: tuning, sql, no_expand, use_nl, ordered
Sign Up Now!
Solution Provided By: Jerry_Pang
Participating Experts: 3
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32