Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2009
    Posts
    7

    Unanswered: Urgent !! Help-Need to make the procedure faster(currently it is running for 4 days).

    /*Data Ware Housing Scenario*/
    /*Adaptive Server Enterprise/12.5.4*/
    /*Two base tables

    -- THESE ARE IN SAME SERVER
    SCORING..entity T1 (430000- RECORDS)
    SCORING..DRV_SCOV2_PAR_SERVICES T2 (550000 - RECORDS)
    SCORE_WORK..A_SCOV2_USAGE_REVENUE ( 32500000 - RECORDS)

    Basic idea.. For each Entity in T1 there are many services in T2.
    so in the code there are two cursors outer one for ENTITY. INNER FOR SERVICES.

    Need Help.. escalation on head... somebody any idea, how to reduce execution time.. it is taking 4 days to complete..

    There is parallelism that is, in production there will be 8 servers process records from entity table,so effectively there will be 700000 records per server..

    But this itself is taking more than 2 days to complete.......
    Critical part of the code is attached.. somebody please help

    */
    Attached Files Attached Files
    Last edited by suhel_2112; 02-13-10 at 06:18.

  2. #2
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    I assume you have indexes to avoid table scan? Check showplan for the queries in the proc.

    Generally you should first avoid cursors and then avoid unnecessary use of temp tables.

    Instead of trying to understand your code, can you explain in English what the code is supposed to do?

Posting Permissions

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