Access Paths and Optimization
If you want to know how a query will be executed by DB2, you must analyze its access path, which is the method for retrieving data from a specific table. The explain facility will provide information about how DB2 accesses the data to resolve the SQL statements.
You should understand at a high level how SQL statements are processed by the DB2 database engine: Each SQL statement is analyzed by DB2, and then it is determined how to process the statement during a static bind or when executed dynamically. The method used to retrieve data from tables is called the access plan.
The component within DB2 that determines the access plan to be used is known as the optimizer. During the static preparation of an SQL statement, ...