View previous topic :: View next topic
|
Author |
Message |
seema_vidya
New User
Joined: 24 Jun 2005 Posts: 5
|
|
|
|
Can anyone explain me the concept of rebind in DB2 as i have not worked on db2 till now. If explained with an example i will be greatfull to you all. |
|
Back to top |
|
|
brganeshbabu
New User
Joined: 23 Jun 2005 Posts: 34 Location: Chennai
|
|
|
|
You know why Bind is done. If at all u don't know I will explain it. Bind is done to create a plan and package from the DBRM. The plan and package will contain the access path of the query you have given and the possible ways the query can be executed. Out of which the system will identify the efficient one. These details of the table are obtained from the RUNSTATS utility.
Consider this scenario, suppose you have bind a sql yesterday. You have an index for that table. Say, DB2 is going to execute that query you have given, through that index. Today you or someone who has authority deletes that index. When u execute the query tomorrow it will not take the plan that has already created. DB2 automatically rebinds during the execution of the query, since the index is marked incorrect. This is the scenario where you can find rebind.
I think I have explained your doubt. |
|
Back to top |
|
|
mdtendulkar
Active User
Joined: 29 Jul 2003 Posts: 237 Location: USA
|
|
|
|
seema_vidya,
Following links is a series of explanation for BIND, Plan, Packages in DB2
Part 1
Part 2
Part 3
Hope this helps
Regards
Mayuresh |
|
Back to top |
|
|
bimalpattanayak
New User
Joined: 08 Apr 2005 Posts: 3
|
|
|
|
dbrm passed thru bind program ikjeft01 is converted to package which is the compiled form of dbrm.again we pass the package thru bind program
which gives plan which is the executable format of dbrm that is equivalent to link editing.dbrm is just like the source code of sql statements. |
|
Back to top |
|
|
brganeshbabu
New User
Joined: 23 Jun 2005 Posts: 34 Location: Chennai
|
|
|
|
Hi mtendulkar,
This link is really nice. I think vidya, u can very well understand the concepts of bind. |
|
Back to top |
|
|
partha
New User
Joined: 05 May 2005 Posts: 2
|
|
|
|
Hi
Packages should be rebound when any of the following are true, based on current statistics from the catalog:
Changes greater then 20% (NLEAF, NPAGES, NACTIVE) Cluster ratio less then 80% NLEVELS increases greater then 2 HIGH2KEY and LOW@KEY ranges change greater then 10% Cardinality and ROW Count change greater then 20% |
|
Back to top |
|
|
|