Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2003
    Location
    canada
    Posts
    230

    Unanswered: 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

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    BIND requires that you have the appropriate bind file; REBIND doesn't.

  3. #3
    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?

  4. #4
    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

  5. #5
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

  6. #6
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •