Is there any way to trace optimizer's work in DB2?
I don't know of a way to trace all the plans the optimizer considers. Obviously the EXPLAIN statement gives you the plan the optimizer eventually selects (and the re-written statement), but that doesn't tell you anything about the ones it doesn't select.

One way to get a little more info might be to set CURRENT QUERY OPTIMIZATION to different values (the default is 5), run EXPLAIN on the statement, then set it back to the default (5) and run EXPLAIN again.

If you get different plans with the other optimization levels, this may provide a clue as to the paths DB2 is taking in optimizing your statement (of course, if you get the same plan, it doesn't tell you anything!). I would suspect that the simpler the query the more likely you are to find no difference (so conversely this technique would work better with more complex statements).