DB2 EXPLAIN helps you answer questions about Query Performance & Query Optimization; the answers give you the information that you need to make performance improvements. EXPLAIN indicates whether Db2 used an index to access data, whether sorts were performed, whether parallel processing was used, and so on.
What is explain plan in Db2?
Description. PLAN. Specifies that access path information is captured for the SQL statement. Under this option, Db2 uses the access path selection process to generate the EXPLAIN records for the statement. One row is inserted into the PLAN_TABLE for each step used in executing explainable-sql-statement.
What is access path in Db2?
The access path for an SQL statement specifies how Db2 accesses the data that the query specifies. It specifies the indexes and tables that are accessed, the access methods that are used, and the order in which objects are accessed. ... Db2 selects the access paths for dynamic SQL statements when the statements are issued.