Sarangadhar Beginner
Joined: 14 Oct 2004 Posts: 130 Topics: 43 Location: virtual village
|
Posted: Fri Nov 30, 2007 7:30 pm Post subject: access type |
|
|
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 |
|