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 

access type

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


Joined: 14 Oct 2004
Posts: 130
Topics: 43
Location: virtual village

PostPosted: Fri Nov 30, 2007 7:30 pm    Post subject: access type Reply with quote

I did EXPLAIN on below query: columns of the tables are A thru Z.

Code:
SELECT * FROM
TAB2  JOIN  TAB1
ON   TAB2.A = TAB1.A
AND   TAB2.B = TAB1.B
AND   TAB2.C = TAB1.C
AND   TAB2.D = TAB1.D
AND   TAB2.E = TAB1.E
AND   TAB2.F = TAB1.F

WHERE   TAB2.A   = 1
AND   TAB2.D  = 2
AND   TAB2.M  = 3
AND   TAB1.L  = 4
;


AN INDEX IS AVAILABLE ON TAB1(A,B,C,D,E,F)
AN INDEX IS AVAILABLE ON TAB2(A,B,C,D,E,F,G)

Result of EXPLAIN:
tab2:
access type I
matching columns 5

tab1:
access type R


Question: why the TAB1 access type is table space scan (R)/ since I have the index on the TAB1, I believe I should at least get the access type=I with matching columns 1.
_________________
Thanks
Back to top
View user's profile Send private message
Sarangadhar
Beginner


Joined: 14 Oct 2004
Posts: 130
Topics: 43
Location: virtual village

PostPosted: Fri Nov 30, 2007 7:31 pm    Post subject: Reply with quote

sorry, I misgave the EXPLAIN results:

tab2:
access type I
matching columns 6

tab1:
access type R
matching columns 0
_________________
Thanks
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