If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > What is difference between bind and rebind? when we should use rebind instead of bind

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-14-06, 13:35
M_RAS M_RAS is offline
Registered User
 
Join Date: Sep 2003
Location: canada
Posts: 230
What is difference between bind and rebind? when we should use rebind instead of bind

Hello ALL,
I am using db2 v8.2.2 aix 5.2,

Could you please help me to underestand the different between BIND and REBIND and when I should use rebind instead of bind. for performance point of view it is harm full if I use bind instead of rebind?

please help
Reply With Quote
  #2 (permalink)  
Old 02-14-06, 14:24
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
BIND requires that you have the appropriate bind file; REBIND doesn't.
Reply With Quote
  #3 (permalink)  
Old 02-14-06, 14:32
M_RAS M_RAS is offline
Registered User
 
Join Date: Sep 2003
Location: canada
Posts: 230
Quote:
Originally Posted by n_i
BIND requires that you have the appropriate bind file; REBIND doesn't.
Thank you for your help n_i

could you please explain more in point of creating/receating packages and new access plan, we have some degrade performace in production after binding the existing packages, can we asume if we did REBIND instead of BIND it will not impact to performance?
Reply With Quote
  #4 (permalink)  
Old 02-15-06, 02:12
umayer umayer is offline
Registered User
 
Join Date: Dec 2005
Posts: 273
REBIND looks into the catalog, takes the information found there and re-evaluates the access-pathes.

BIND takes the *.BND - file, perfoms a lot of checks ( correct syntax, all tables available , everything granted ... ) and then evaluates the access-pathes.

so BIND is more expensive than a REBIND (and can produce some additional errors).
But as both ( BIND and REBIND ) evaluate the access-pathes ( and will pick the same ones ) the performance when executing the package will be the same
Reply With Quote
  #5 (permalink)  
Old 02-15-06, 02:26
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Quote:
Originally Posted by umayer
REBIND looks into the catalog, takes the information found there and re-evaluates the access-pathes.

BIND takes the *.BND - file, perfoms a lot of checks ( correct syntax, all tables available , everything granted ... ) and then evaluates the access-pathes.

so BIND is more expensive than a REBIND (and can produce some additional errors).
But as both ( BIND and REBIND ) evaluate the access-pathes ( and will pick the same ones ) the performance when executing the package will be the same
Both the bind and rebind will make sure that the dependent objects still exist. If a required object was previously dropped (table, etc) then the package would have marked as invalid when the drop took place. If a package is marked as invalid, and someone executes the package, then an automatic rebind will be performed. For a package marked as invalid, when a bind (replace), explicit rebind, or automatic rebind is performed, if the object is still not available then the package is marked as inopertive (no further automatic rebinds will take place and the execution will fail).

A bind (replace) allows you to specify new bind parameters. A rebind uses the same bind parameters as were originally used during the initial bind.

Generally speaking, if you want to redo the access path (if for example you added a new index), then a rebind is usually the best option. If you want to change the bind parameters, then a bind (replace) should be used.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #6 (permalink)  
Old 02-15-06, 08:32
M_RAS M_RAS is offline
Registered User
 
Join Date: Sep 2003
Location: canada
Posts: 230
Quote:
Originally Posted by Marcus_A
Both the bind and rebind will make sure that the dependent objects still exist. If a required object was previously dropped (table, etc) then the package would have marked as invalid when the drop took place. If a package is marked as invalid, and someone executes the package, then an automatic rebind will be performed. For a package marked as invalid, when a bind (replace), explicit rebind, or automatic rebind is performed, if the object is still not available then the package is marked as inopertive (no further automatic rebinds will take place and the execution will fail).

A bind (replace) allows you to specify new bind parameters. A rebind uses the same bind parameters as were originally used during the initial bind.

Generally speaking, if you want to redo the access path (if for example you added a new index), then a rebind is usually the best option. If you want to change the bind parameters, then a bind (replace) should be used.

Thank you all for your help, really appriciated
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On