IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Drop index in DB2 Table


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
thunderstorm

New User


Joined: 23 Mar 2007
Posts: 35
Location: pune

PostPosted: Sat Aug 08, 2009 3:16 am
Reply with quote

Hi,

Can anyone tell me that if i drop an index , do i need to do runstats and reorg ? Do i also need to recompile the programs which were using the index ? What would happen if i drop the index , do no do the runstats and reorg but donot recompile the program.

Waiting for the reply

Thanks !
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Aug 08, 2009 3:32 am
Reply with quote

Hello,

Quote:
What would happen if i drop the index , do no do the runstats and reorg but donot recompile the program
Any number of very bad things. . . If you want a list, run some experiments using tables/data no one else uses.

You should re-compile and rebind all of the programs that use the table. It is doubtful that you will know which queries may use that index.

You surely want to do runstats. You may or may not want to run a reorg. Suggest you do both. I am very big on problem/surprise avoidance. . . icon_cool.gif
Back to top
View user's profile Send private message
thunderstorm

New User


Joined: 23 Mar 2007
Posts: 35
Location: pune

PostPosted: Sat Aug 08, 2009 4:06 am
Reply with quote

[You should re-compile and rebind all of the programs that use the table. It is doubtful that you will know which queries may use that index.
]

I know which all programs use that index as i have explain reports. I have modified the program to avoid using that index. Actually , there is only 1 program which is using that index ( apparently this index is a secondary index ) and when the index was defined , the size of table was really small but now the size of the table is nearly 500 million times and any structure change causes a problem in the table as well as as Reorg also takes time.

so, is it fine if i recompile just the one program using that index ?[/quote]
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Aug 08, 2009 5:22 am
Reply with quote

Hello,

Quote:
so, is it fine if i recompile just the one program using that index
IMHO, no i believe it is not fine. . .

You might "get away" with taking the shortcut, but all i can mention is that it is better to get into the habit following a process that will always work rather than something to save a bit of time.

You really, really don't want to establish a pattern that routine maintenance becomes a new experience every time you make some change. . .

Again, only mho. . . icon_neutral.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
No new posts DROP & ALTER PARTITION-PBR DB2 0
Search our Forums:

Back to Top