If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > How to Fix MATCHCOLS = 0

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-22-07, 10:23
vini_srcna vini_srcna is offline
Registered User
 
Join Date: May 2006
Posts: 82
How to Fix MATCHCOLS = 0

Hi Everyone,

I have one performance issue and when i ran an EXPLAIN on that i found the MATCHCOLS = 0 on the index it was using. Now i have created another index on the columns the query is using and ran an RUNSTATS & REBUILD utility on that. But the explain information in the plan table still says that the new index has not been used.

Is there anyway we can force DB2 to use the new index..? I'm sure if it uses the new index i have created it would come with MATCHCOLS greater than zero and it will go for INDEX ONLY scan. I have no much idea about this and didnt get an oppurtunity to work on this. Can you guys please help me..?

I have taken the RUNSTATS on the table data as well. When DB2 can get the more information from the new index why it is going for the old INDEX..? My question may sound odd. I was just thinking if there is way to ask DB2 to use this INDEX. (I know we just WHAT TO DO and not HOW TO DO ) but still curious. Please help me..!!
__________________
Vinay,
Reply With Quote
  #2 (permalink)  
Old 08-22-07, 16:52
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
What's the query and what's the index definition? Maybe your query is written in such a way that no matching index scan can be performed.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On