Results 1 to 3 of 3

Thread: performance

  1. #1
    Join Date
    Jun 2013
    Posts
    6

    Unanswered: performance

    hi friends

    pls help me in this by tuning this query



    SELECT (SELECT NAME FROM OFFICE_MASTER WHERE RECORD_STATUS=1 AND ID=C.OFFICE_ID) AS SECNAME, C.OFFICE_ID,COUNT(C.ID) AS TOTAL,COUNT(BP.CONS_NUM) AS COMPARED_CONSUMERS
    FROM CONSUMER_MASTER C,BILL_DETAILS_T B,BILL_PROCESS_T BP
    WHERE C.ID = B.CONS_NUM AND BP.CONS_NUM(+)=B.CONS_NUM
    AND TRUNC(B.BLISSUE_DT) BETWEEN TO_DATE('03-JUN-2013','DD-MON-RRRR') AND TO_DATE('10-JUN-2013','DD-MON-RRRR')
    AND BP.BILLMONTH(+)=B.BILLMONTH AND BP.BILLYEAR(+)=B.BILLYEAR
    AND C.RECORD_STATUS=1 AND B.RECORD_STATUS=1 AND BP.RECORD_STATUS(+)=1
    AND B.BILL_TYPE='SBM'
    GROUP BY C.OFFICE_ID

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    Please provide the details requested below
    1) DDL for all tables & indexes
    2) EXPLAIN PLAN
    3) output from SQL_TRACE & tkprof
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Jul 2002
    Posts
    227
    Quote Originally Posted by grahi View Post
    hi friends

    pls help me in this by tuning this query



    SELECT (SELECT NAME FROM OFFICE_MASTER WHERE RECORD_STATUS=1 AND ID=C.OFFICE_ID) AS SECNAME, C.OFFICE_ID,COUNT(C.ID) AS TOTAL,COUNT(BP.CONS_NUM) AS COMPARED_CONSUMERS
    FROM CONSUMER_MASTER C,BILL_DETAILS_T B,BILL_PROCESS_T BP
    WHERE C.ID = B.CONS_NUM AND BP.CONS_NUM(+)=B.CONS_NUM
    AND TRUNC(B.BLISSUE_DT) BETWEEN TO_DATE('03-JUN-2013','DD-MON-RRRR') AND TO_DATE('10-JUN-2013','DD-MON-RRRR')
    AND BP.BILLMONTH(+)=B.BILLMONTH AND BP.BILLYEAR(+)=B.BILLYEAR
    AND C.RECORD_STATUS=1 AND B.RECORD_STATUS=1 AND BP.RECORD_STATUS(+)=1
    AND B.BILL_TYPE='SBM'
    GROUP BY C.OFFICE_ID
    use SQL Tuning Advisor (SQL Profile). It's an excellent oracle tool

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •