Binding an optimization profile to a package
When you prepare a package by using the BIND or PRECOMPILE command, you can use the OPTPROFILE command parameter to specify the optimization profile for the package.
About this task
Procedure
You can bind an optimization profile in SQLJ or embedded
SQL using APIs (for example, sqlaprep) or the command
line processor (CLP).
For example, the following
code shows how to bind an inventory database optimization profile
to an inventory application from the CLP:
db2 prep inventapp.sqc bindfile optprofile newton.inventdb
db2 bind inventapp.bnd
db2 connect reset
db2 terminate
xlc -I$HOME/sqllib/include -c inventapp.c -o inventapp.o
xlc -o inventapp inventapp.o -ldb2 -L$HOME/sqllib/lib
If you do not specify a schema name for the optimization profile, the QUALIFIER command parameter is used as the implicit qualifier.