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.