MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Index column in Plan table

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
Rajat
Beginner


Joined: 17 Dec 2003
Posts: 1
Topics: 1

PostPosted: Wed Dec 17, 2003 9:27 am    Post subject: Index column in Plan table Reply with quote

Hi there!,

Suppose, I have a table ABC with index INDX1 defined on three of its columns COL1, COL2 and COL3.

And there is a query with COL1, COL2 AND COL3 in its WHERE clause.

After doing an EXPLAIN of this query I found in PLAN TABLE that the DB2 accesstype is I and MATCHCOLS = 1.

Is there any way to know that which of the columns of the index INDX1, DB2 is referring to?

Thanks.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Wed Dec 17, 2003 10:39 am    Post subject: Reply with quote

Rajat,

If the column ACCESSTYPE in the plan table has a value of I, then DB2 uses an index to access the table named in column TNAME. The columns ACCESSCREATOR and ACCESSNAME identify the index.

If MATCHCOLS is greater than 0, the access method is called a matching index scan: the query uses predicates that match the index columns.

If MATCHCOLS is less than the number of index key columns, it indicates that index screening is possible.

Hope this helps...

cheers

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Glenn
Beginner


Joined: 23 Mar 2003
Posts: 56
Topics: 3

PostPosted: Thu Mar 04, 2004 1:00 am    Post subject: Reply with quote

If you look in a higher post, there is a link posted which describes EXPLAIN results.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group