Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Drop index in DB2 Table

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Drop index in DB2 Table
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

Site Director


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

PostPosted: Sat Aug 08, 2009 3:32 am    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Sat Aug 08, 2009 5:22 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
No new posts PC (UTF-8) -> z/OS (EBCDIC) -> ... prino All Other Mainframe Topics 4 Fri Sep 01, 2017 1:47 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us