I have been writing db2 sql code for two years, and now, I wonder if anyone knows if exists any programm or application to debug/trace easily this code.
Hi Julen,
When you say trace, do you wish to see what access paths are being taken etc.? If so, you need to look into the EXPLAIN feature. There any many products on the market, suitable for whatever platform you happen to be on, that take DB2's basic EXPLAIN feature and enhance it to be more user friendly, but basically you EXPLAIN your SQL which writes rows to a table called PLAN_TABLE. This can then be looked at to see what order the tables are being accessed and whether indexes are being used or table scans done.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.