PLAN IS EXECUTABLE AND PACKAGE IS NOT EXECUTABLE . THEN WHAT
IS THE USE OF PACKAGE?

Answer Posted / vaneesh khurana

See there is not doubt that PLAN is an executable form of
DBRM and package is not the executable form.
Basically a DBRM can be linked to PLAN directly or a DBRM
can be linked to Package and that package can further linked
to the PLAN
Now if we directly link the DBRM with the plan then every
time we recompile the program(DBRM) we have to regenerate
the plan.
Whereas if we link the DBRM via package then every time we
recompile the program(DBRM) we only require to recompile the
Package.
Hence Binding through package prevents regeneration of plan.

1 more line I want to add just for knowledge.
If we regenerate the PLAN every time then all the other
Programs(DBRMs) which are attached to that same PLAN
required to be rebind thus take waste time.


Hope this answers your query...

Is This Answer Correct ?    27 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is dbrm library?

664


Explain correlated sub-queries.

663


How to retrieve rows from a db2 table in embedded sql?

846


How to restart a DB2 program?

1456


define clustering index.

702






Define db2.

756


in my project..TEST is db2 8.1 version In PROD it is 7.1 if i do REORG in TEST.. can I use the same REORG jcl with out modification in PROD region (this is DB2 8.1 )? if not, what modification i need to do in my REORG control card?

1723


What is a dbrm in db2?

660


What is a db2 table?

684


What is db2 stogroup?

780


What are the rules for db2 programming?

728


In an sql table that is embedded, what is the procedure to retrieve rows that are part of a db2 table?

725


What is bind in db2?

679


What is the role of union all and union

728


What is bind and rebind in db2?

738