Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2003
    Posts
    60

    Unanswered: Updates on Temp tables

    Hi All,

    In one of our batch SQLs, updates on a temp table created in the same session is running very slow.

    Is there any way we can speed it up? Indexing or so?

    Thanks in advance,
    jfk

  2. #2
    Join Date
    Jul 2003
    Location
    Austin, TX, USA
    Posts
    278

    Use DB2 Advisor.

    Hi,

    I can suggest a few things,

    1. Use the DB2 Advisor Tool, this is an interactive tool and using the information you provide, db2 will then describe what indexes can be created.

    2. Monitor using snapshot's that would give you an idea of the exact time being taken.

    3. Increase your database logging if you feel that the data being updated is high. Or check for the bufferpool size and it's hit ratio.

    Hope this helps

    Regards

    Nitin.

  3. #3
    Join Date
    Dec 2002
    Posts
    10
    Some questions.

    1. Which version of DB2 you are in?

    V8 has very good enhancements for DGTT You can create indexes, run RUNSTATS on the table and index and NOT LOGGED is now optional

    Note: you cannot view the runstats and index information from the catalogs from DGTT

  4. #4
    Join Date
    Mar 2003
    Posts
    60
    Its version 7.2

    Here is the query which is taking 5 hours to finish :

    UPDATE SESSION.TEMP02 TMP_AMT
    SET (
    VAL
    ) =
    (
    SELECT TMP_CVL.VAL
    FROM SESSION.TEMP_VAL TMP_CVL
    WHERE TMP_AMT.CVRG_ID = TMP_CVL.CVRG_ID
    AND TMP_AMT.NUM = TMP_CVL.NUM
    );



    Originally posted by Swaminaathan
    Some questions.

    1. Which version of DB2 you are in?

    V8 has very good enhancements for DGTT You can create indexes, run RUNSTATS on the table and index and NOT LOGGED is now optional

    Note: you cannot view the runstats and index information from the catalogs from DGTT

Posting Permissions

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