Quote:
Originally Posted by prakash5686
Thanks Marcus.
How far can we believe on EXPLAIN tool for Db2 sql queries?
|
I don't know what you are asking. Generally the explain is accurate if done on the same system as the query is run. But you could get different results if your literals are different in the query than in the explain, or if parameter markers are used in the explain and literals are used in the query.
Also, the DB2 optimizer only estimates how many rows will be returned, and could be wrong based on the quality of statistics captured with runstats. But the access path is likely to be the same (index, table scan, etc).