Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 Loading data to table gives wrong for... Raghu navaikulam DB2 16 Thu Jul 13, 2017 2:11 pm
No new posts SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am
No new posts unload data from table with lob columns farhad_evan DB2 1 Sat Apr 22, 2017 1:32 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us