I have a problem with simple query like this (PK - Primary key)
select t1.*, t2.col1, t3.col2
from
T1
inner join T2 on T2.PK = T1.col1
inner join T3 on T3.PK = T2.col1
T1 is very small table ~20-30 rows, T2 and T3 large. In query plan and
monitor output I see table scan on T3. Why?
Index T2_PK has included column col1.
Access Plan:
-----------
Total Cost: 43603.2
Query Degree: 1
Rows
RETURN
( 1)
Cost
I/O
|
3092
HSJOIN
( 2)
43602.9
10783
/------+------\
227641 3092
TBSCAN NLJOIN
( 3) ( 4)
40666.2 2926.35
10361 422.045
| /---+---\
227641 3092 1
TABLE: S TBSCAN IXSCAN
T3 ( 5) ( 8)
406.107 50.016
100 2
| |
3092 64931
SORT INDEX: S
( 6) T2_PK
406.107
100
|
3092
TBSCAN
( 7)
404.727
100
|
3092
TABLE: S
T1
Andy
P.S. UDB 8.2 FP10 win32