View previous topic :: View next topic |
Author |
Message |
lacoe1 Beginner
Joined: 24 Feb 2005 Posts: 33 Topics: 17
|
Posted: Thu Nov 09, 2006 1:53 pm Post subject: Adding a column to the index of DB2 table |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Thu Nov 09, 2006 1:59 pm Post subject: |
|
|
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 |
|
 |
lacoe1 Beginner
Joined: 24 Feb 2005 Posts: 33 Topics: 17
|
Posted: Thu Nov 09, 2006 2:01 pm Post subject: |
|
|
Just curious: What error will I get if I donot recompile? |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Thu Nov 09, 2006 2:14 pm Post subject: |
|
|
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 |
|
 |
lacoe1 Beginner
Joined: 24 Feb 2005 Posts: 33 Topics: 17
|
Posted: Thu Nov 09, 2006 2:42 pm Post subject: |
|
|
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 |
|
 |
bauer Intermediate
Joined: 10 Oct 2003 Posts: 317 Topics: 50 Location: Germany
|
Posted: Fri Nov 10, 2006 2:21 am Post subject: |
|
|
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 |
|
 |
videlord Beginner
Joined: 09 Dec 2004 Posts: 147 Topics: 19
|
Posted: Fri Nov 10, 2006 12:05 pm Post subject: |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Fri Nov 10, 2006 12:20 pm Post subject: |
|
|
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 |
|
 |
|
|