What Is a Plan?

 <  Day Day Up  >  

A plan is an executable module containing the access path logic produced by the DB2 optimizer. It can be composed of one or more DBRMs and packages.

Plans are created by the BIND command. When a plan is bound, DB2 reads the following DB2 Catalog tables:

SYSIBM.SYSCOLDIST

SYSIBM.SYSCOLDISTSTATS

SYSIBM.SYSCOLSTATS

SYSIBM.SYSCOLUMNS

SYSIBM.SYSINDEXES

SYSIBM.SYSINDEXSTATS

SYSIBM.SYSPLAN

SYSIBM.SYSPLANAUTH

SYSIBM.SYSTABLES

SYSIBM.SYSTABLESPACE

SYSIBM.SYSTABSTATS

SYSIBM.SYSUSERAUTH


NOTE

The SYSIBM.SYSUSERAUTH table (the last one in the list) is read-only for BIND ADD .


Information about the plan is then stored in the following DB2 Catalog tables:

SYSIBM.SYSDBRM

SYSIBM.SYSPACKAUTH

SYSIBM.SYSPACKLIST

SYSIBM.SYSPLAN

SYSIBM.SYSPLANAUTH

SYSIBM.SYSPLANDEP

SYSIBM.SYSPLSYSTEM

SYSIBM.SYSSTMT

SYSIBM.SYSTABAUTH

 

Note that the DB2 Catalog stores only information about the plans. The executable form of the plan, called a skeleton cursor table , or SKCT, is stored in the DB2 Directory in the SYSIBM.SCT02 table. To learn more about the way that DB2 handles SKCTs at execution time, see Chapter 22, "The Table-Based Infrastructure of DB2."

 <  Day Day Up  >  


DB2 Developers Guide
DB2 Developers Guide (5th Edition)
ISBN: 0672326132
EAN: 2147483647
Year: 2004
Pages: 388

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net