Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2012
    Posts
    1

    Unanswered: Using global variables in db2 queries

    I am testing a complex query in db2 in which I'm using db2 global variables for supplying values to the where clauses. I find the query taking horribly long time to execute. This doesn't happen when I hard-code the values directly.

    Also sometimes DB2 control center hangs and won't even allow to drop or set the global variables.

    Would like to know anything that needs to be taken care of when using global variables and the possible explanation for the above behavior I am facing.

    Thanks in advance.

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    Have you checked the access plan differences between the two cases?

    Thanks

    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

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
  •