DB2 10.5 for Linux, UNIX, and Windows

SQL and XQuery explain tool

The db2expln command describes the access plan selected for SQL or XQuery statements.

You can use this tool to obtain a quick explanation of the chosen access plan when explain data was not captured. For static SQL and XQuery statements, db2expln examines the packages that are stored in the system catalog. For dynamic SQL and XQuery statements, db2expln examines the sections in the query cache.

The explain tool is located in the bin subdirectory of your instance sqllib directory. If db2expln is not in your current directory, it must be in a directory that appears in your PATH environment variable.

The db2expln command uses the db2expln.bnd, db2exsrv.bnd, and db2exdyn.bnd files to bind itself to a database the first time the database is accessed.