IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Explain me the concept of rebind in DB2


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
seema_vidya

New User


Joined: 24 Jun 2005
Posts: 5

PostPosted: Fri Jun 24, 2005 11:52 am
Reply with quote

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
View user's profile Send private message
brganeshbabu

New User


Joined: 23 Jun 2005
Posts: 34
Location: Chennai

PostPosted: Tue Jun 28, 2005 1:09 pm
Reply with quote

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
View user's profile Send private message
mdtendulkar

Active User


Joined: 29 Jul 2003
Posts: 237
Location: USA

PostPosted: Wed Jun 29, 2005 4:30 am
Reply with quote

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
View user's profile Send private message
bimalpattanayak

New User


Joined: 08 Apr 2005
Posts: 3

PostPosted: Thu Jun 30, 2005 2:28 pm
Reply with quote

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
View user's profile Send private message
brganeshbabu

New User


Joined: 23 Jun 2005
Posts: 34
Location: Chennai

PostPosted: Thu Jun 30, 2005 3:44 pm
Reply with quote

Hi mtendulkar,
This link is really nice. I think vidya, u can very well understand the concepts of bind.
Back to top
View user's profile Send private message
partha

New User


Joined: 05 May 2005
Posts: 2

PostPosted: Fri Jul 01, 2005 4:46 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts DB2 Statistics - Using EXPLAIN and qu... DB2 1
No new posts Rebind issue - Package DB2 2
No new posts Should we Rebind Plan if no SQL changes DB2 2
No new posts Can someone explain me this JCL line ... JCL & VSAM 9
No new posts JCL overriding concept JCL & VSAM 14
Search our Forums:

Back to Top