Results 1 to 2 of 2
  1. #1
    Join Date
    May 2007

    Unanswered: DB2 query behaviour

    Hi ,
    I am facing problems with a select query in DB2.The query normally returns results in about 30 seconds when i run it,but sometimes it takes around 2 hrs to return the results.The query reads from a Datamart database and is populated by running batch scripts.
    Is there any explanation for this kind of behaviour??
    The version of DB2 i am using is DB2 v8.1.7.445

  2. #2
    Join Date
    Jan 2003
    Provided Answers: 5
    There can be numerous reasons why. Anything from poorly written SQL, lock contention, DB and DBM configuration issues, old or nonexistant runstats, etc, etc.

    The first place I would start would be to generate access plans on the EXACT SQL running. This will let you know if you are doing table scans on the wrong tables. Also you need to monitor the system while queries are active to check for lock contention.


Posting Permissions

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