DBAsupport.com Forums - Powered by vBulletin
Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: quer Performance issue

  1. #11
    Join Date
    Dec 2010
    Posts
    7
    Hi,
    I appreciate your comments.
    Sorry for wrong information passed by me.

    The optimizer mode used in both the PROD and DEV is CHOOSE.
    Secondly,
    It's a production database i can't alow to do flush the share pool size.

    Thirdly:
    The main issue is difference in excution plan in PROD compare to DEV as i mentioned earlier.
    As i mentioned earlier:
    IN DEV:
    ===========
    Misses in library cache during parse: 1
    Optimizer mode: CHOOSE
    Parsing user id: 5 (SYSTEM)

    Rows Row Source Operation
    ------- ---------------------------------------------------
    364 HASH UNIQUE (cr=1208 pr=0 pw=0 time=783194 us)
    545 FILTER (cr=1208 pr=0 pw=0 time=775342 us)
    545 HASH JOIN (cr=1208 pr=0 pw=0 time=774670 us)
    99432 TABLE ACCESS FULL CONTRACT_TRANS (cr=382 pr=0 pw=0 time=465 us)
    18225 HASH JOIN (cr=826 pr=0 pw=0 time=359469 us)
    1000 HASH JOIN (cr=445 pr=0 pw=0 time=108528 us)
    46 TABLE ACCESS FULL CONTRACT_TRANS_GROUP (cr=223 pr=0 pw=0 time=48274 us)
    675 TABLE ACCESS FULL CONTRACT_TRANS_GROUP (cr=222 pr=0 pw=0 time=51497 us)
    99432 TABLE ACCESS FULL CONTRACT_TRANS (cr=381 pr=0 pw=0 time=182 us)

    IN PROD
    =============
    Rows Row Source Operation
    ------- ---------------------------------------------------
    364 HASH UNIQUE (cr=319722 pr=219 pw=0 time=78406184 us)
    545 FILTER (cr=319722 pr=219 pw=0 time=78385884 us)
    545 HASH JOIN (cr=319722 pr=219 pw=0 time=78384017 us)
    675 TABLE ACCESS FULL CONTRACT_TRANS_GROUP (cr=222 pr=219 pw=0 time=328724 us)
    2380118 NESTED LOOPS (cr=319500 pr=0 pw=0 time=71521450 us)
    837 HASH JOIN (cr=603 pr=0 pw=0 time=315980 us)
    46 TABLE ACCESS FULL CONTRACT_TRANS_GROUP (cr=222 pr=0 pw=0 time=48647 us)
    99432 TABLE ACCESS FULL CONTRACT_TRANS (cr=381 pr=0 pw=0 time=100990 us)
    2380118 TABLE ACCESS FULL CONTRACT_TRANS (cr=318897 pr=0 pw=0 time=70077111 us)


    The above row execution plan where we absorve diffenence in execution.
    My big worry is thta in PROD executon plan why too much nexteing is happening durinh FTP.

    Noteata is same in prod & DEV.

    Cheers,
    Rajesh Gudaru

  2. #12
    Join Date
    Mar 2006
    Location
    Charlotte, NC
    Posts
    865
    The production plan is clearly showing that you have more rows in production. No confusion in that.

    In Dev...

    364 HASH UNIQUE (cr=1208 pr=0 pw=0 time=783194 us)
    545 FILTER (cr=1208 pr=0 pw=0 time=775342 us)
    545 HASH JOIN (cr=1208 pr=0 pw=0 time=774670 us)
    99432 TABLE ACCESS FULL CONTRACT_TRANS (cr=382 pr=0 pw=0 time=465 us)
    18225 HASH JOIN (cr=826 pr=0 pw=0 time=359469 us)
    1000 HASH JOIN (cr=445 pr=0 pw=0 time=108528 us)
    46 TABLE ACCESS FULL CONTRACT_TRANS_GROUP (cr=223 pr=0 pw=0 time=48274 us)
    675 TABLE ACCESS FULL CONTRACT_TRANS_GROUP (cr=222 pr=0 pw=0 time=51497 us)
    99432 TABLE ACCESS FULL CONTRACT_TRANS (cr=381 pr=0 pw=0 time=182 us)
    In Prod ...

    364 HASH UNIQUE (cr=319722 pr=219 pw=0 time=78406184 us)
    545 FILTER (cr=319722 pr=219 pw=0 time=78385884 us)
    545 HASH JOIN (cr=319722 pr=219 pw=0 time=78384017 us)
    675 TABLE ACCESS FULL CONTRACT_TRANS_GROUP (cr=222 pr=219 pw=0 time=328724 us)
    2380118 NESTED LOOPS (cr=319500 pr=0 pw=0 time=71521450 us)
    837 HASH JOIN (cr=603 pr=0 pw=0 time=315980 us)
    46 TABLE ACCESS FULL CONTRACT_TRANS_GROUP (cr=222 pr=0 pw=0 time=48647 us)
    99432 TABLE ACCESS FULL CONTRACT_TRANS (cr=381 pr=0 pw=0 time=100990 us)
    2380118 TABLE ACCESS FULL CONTRACT_TRANS (cr=318897 pr=0 pw=0 time=70077111 us)
    Can you please check which join or condition in production is fetching more data and investigate from there??

    Thanks,
    Vijay Tummala

    Try hard to get what you like OR you will be forced to like what you get.

  3. #13
    Join Date
    Dec 2010
    Posts
    7
    Hi Friends,
    As earlier post details are below:

    IN PROD
    =============
    OWNER TABLE_NAME PAR NUM_ROWS DEGREE LAST_ANALY
    ------ ----------------- --- ---------- ---------- ----------
    TEST CONTRACT_TRANS NO 92056 1 21/12/2010
    TEST CONTRACT_TRANS_GROUP NO 29636 1 22/12/2010
    WTSG CONTRACT_TRANS NO 94520 1 23/12/2010
    WTSG CONTRACT_TRANS_GROUP NO 28687 1 23/12/2010


    IN DEV
    ==========
    OWNER TABLE_NAME PAR NUM_ROWS DEGREE LAST_ANALY
    ------ ------------ --- ---------- ---------- ----------
    TESTDEV CONTRACT_TRANS NO 92056 1 21/12/2010
    WTSG CONTRACT_TRANS NO 92056 1 21/12/2010
    WTSG CONTRACT_TRANS_GROUP NO 29636 1 22/12/2010
    TESTDEV CONTRACT_TRANS_GROUP NO 29636 1 22/12/2010

    Cheers,
    Rajesh Gudaru

  4. #14
    Join Date
    Mar 2006
    Location
    Charlotte, NC
    Posts
    865
    Rajesh,

    Please generate the explain plan (in dev & prod) using

    explain plan for
    SQL statement

    properly format it and attached to your post.

    Thanks,
    Vijay Tummala

    Try hard to get what you like OR you will be forced to like what you get.

  5. #15
    Join Date
    Dec 2010
    Posts
    7
    Hi Venkat,
    As i mentioned earlier both the PROD and DEV having the same rows.
    But in pROD execution plan it was showing more rows.
    Here i am just confused.

    Cheers,
    Rajesh Gudaru

  6. #16
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    Quote Originally Posted by Rajesh Gudaru View Post
    As i mentioned earlier both the PROD and DEV having the same rows.
    But in pROD execution plan it was showing more rows.
    Here i am just confused.
    Are you fully qualifying table_names in your query?

    Please run and post:
    Code:
    select  owner,
            table_name,
            num_rows,
            last_analyzed
    from    sys.dba_tables
    where   table_name in('CONTRACT_TRANS');
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

Tags for this Thread

Posting Permissions

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


Click Here to Expand Forum to Full Width