MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Adding a column to the index of DB2 table

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
lacoe1
Beginner


Joined: 24 Feb 2005
Posts: 33
Topics: 17

PostPosted: Thu Nov 09, 2006 1:53 pm    Post subject: Adding a column to the index of DB2 table Reply with quote

If I add a column to the Index of a DB2 table, do I have to recompile and bind the application program accessing the table even if there are no changes to the program.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Nov 09, 2006 1:59 pm    Post subject: Reply with quote

lacoe1,

yes you need to recompile and bind the application program so that it picks up the new access paths as the index has been changed

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
lacoe1
Beginner


Joined: 24 Feb 2005
Posts: 33
Topics: 17

PostPosted: Thu Nov 09, 2006 2:01 pm    Post subject: Reply with quote

Just curious: What error will I get if I donot recompile?
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Nov 09, 2006 2:14 pm    Post subject: Reply with quote

lacoe1,

You will not get an error. It is just the pgms will not be able to use the new index and old access paths will no longer be valid and your pgm performance will go down.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
lacoe1
Beginner


Joined: 24 Feb 2005
Posts: 33
Topics: 17

PostPosted: Thu Nov 09, 2006 2:42 pm    Post subject: Reply with quote

Thanks Kolusu!
But another, question:
If I have data that is sorted on 6 fields (4 ascending, 2 descending), and the table that I want this data to get loaded into has 4 fields (same as the 4 ascending fields in the sorted data) as the index. Will the data get loaded exactly as
it is sorted in the file or will the index affect it ?
Back to top
View user's profile Send private message
bauer
Intermediate


Joined: 10 Oct 2003
Posts: 317
Topics: 50
Location: Germany

PostPosted: Fri Nov 10, 2006 2:21 am    Post subject: Reply with quote

kolusu,

I don't agree with your answer. I would say, if an column is added to an index it is only necessary to do an rebind of the packages / plans of the programs, which may use the index, recompile is not necessary.

Why do you say, recompile is necessary?

bauer
Back to top
View user's profile Send private message
videlord
Beginner


Joined: 09 Dec 2004
Posts: 147
Topics: 19

PostPosted: Fri Nov 10, 2006 12:05 pm    Post subject: Reply with quote

I think rebind is enough
no need to recompile the program

for the LOAD utility, the data will be loaded the same sequence as the input file
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Nov 10, 2006 12:20 pm    Post subject: Reply with quote

Quote:

kolusu,

I don't agree with your answer. I would say, if an column is added to an index it is only necessary to do an rebind of the packages / plans of the programs, which may use the index, recompile is not necessary.

Why do you say, recompile is necessary?


bauer,

Most shops club the compile-link-Bind as a single process instead of breaking them seperately to avoid any bind errors such as -805 and -818.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group