vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| ford_desperado@yahoo.com wrote: > I take it the optimizer rewrites my queries. > Can i see the rewritten ones? > > DB2 UDB v8.1 > > TIA > cd to sqllib/misc connect to your database db2 -tvf EXPLAIN.DDL db2 explain plan for <query> db2exfmt -d <dbname> <accept all default except when asks you for a filename> The rewritten query is at the top. Note that DB2 does it's best, but is not guranteed to produce the SQL since the internal model is more general than SQL. Not always can the query be reverse engineered into SQL Text. Cheers Serge |