Need to add a new Index - compile or rebind?
-
- Registered Member
- Posts: 17
- Joined: Tue Aug 20, 2013 10:44 am
Need to add a new Index - compile or rebind?
Hi,
For an existing DB2 Table of zOS, if we add a new index would it require to compile or rebind the existing programs?
Regards,
Sulabh
For an existing DB2 Table of zOS, if we add a new index would it require to compile or rebind the existing programs?
Regards,
Sulabh
- Anuj Dhawan
- Founder
- Posts: 2824
- Joined: Sun Apr 21, 2013 7:40 pm
- Location: Mumbai, India
- Contact:
Re: Need to add a new Index - compile or rebind?
Unless I'm mistaken - you'd need both. If the index column is not used in any SELECT for a given program, you'd bind it get the proper access path, fwiw.
Thanks,
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
-
- Registered Member
- Posts: 17
- Joined: Tue Aug 20, 2013 10:44 am
- enrico-sorichetti
- Global Moderator
- Posts: 843
- Joined: Wed Sep 11, 2013 3:57 pm
Re: Need to add a new Index - compile or rebind?
adding an index is transparent to the application program...
a rebind is more than enough
a rebind is more than enough
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort

-
- Registered Member
- Posts: 17
- Joined: Tue Aug 20, 2013 10:44 am
Re: Need to add a new Index - compile or rebind?
I'm not sure enrico-sorichetti if I followed you, could you please restate that again.
- enrico-sorichetti
- Global Moderator
- Posts: 843
- Joined: Wed Sep 11, 2013 3:57 pm
Re: Need to add a new Index - compile or rebind?
adding an index is transparent to the application program...
restated how requested
quick and dirty explanation ...
when issuing a select on a table without indexes DB2 must do a FULL table scan to find out the rows
which satisfy the where condition of the select
if an index is defined on the relevant columns a FULL table scan is no longer needed ( generally )
so the APPLICATION PROGRAM is not aware of the optimisations implemented by the support group
to take advantage of the new performance option ( the index ) a bind is required
restated how requested

quick and dirty explanation ...
when issuing a select on a table without indexes DB2 must do a FULL table scan to find out the rows
which satisfy the where condition of the select
if an index is defined on the relevant columns a FULL table scan is no longer needed ( generally )
so the APPLICATION PROGRAM is not aware of the optimisations implemented by the support group
to take advantage of the new performance option ( the index ) a bind is required
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort

Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute