Subject | Index not being used? |
---|---|
Author | Kevin Lingofelter |
Post date | 2004-06-28T00:55:44Z |
Hello,
I have this query:
select APPLICATIONS.*
from APPLICATIONS
inner join BASEAPPLICATIONS on
(APPLICATIONS.MAKE = BASEAPPLICATIONS.MAKE) and
(APPLICATIONS.MODEL = BASEAPPLICATIONS.MODEL) and
(APPLICATIONS."YEAR" = BASEAPPLICATIONS."YEAR")
where
(
(PARTTYPEID = 14)
and
(DPI1 is not null )
)
Both tables have the MAKE, MODEL and YEAR fields indexed, but the plan
reads:
PLAN JOIN (BASEAPPLICATIONS NATURAL,APPLICATIONS INDEX
(APPLICATIONS_IDX2,APPLICATIONS_IDX3))
Index2 and 3 are the MODEL and YEAR fields. Why isn't it using the MAKE
index?
Kevin Lingofelter
I have this query:
select APPLICATIONS.*
from APPLICATIONS
inner join BASEAPPLICATIONS on
(APPLICATIONS.MAKE = BASEAPPLICATIONS.MAKE) and
(APPLICATIONS.MODEL = BASEAPPLICATIONS.MODEL) and
(APPLICATIONS."YEAR" = BASEAPPLICATIONS."YEAR")
where
(
(PARTTYPEID = 14)
and
(DPI1 is not null )
)
Both tables have the MAKE, MODEL and YEAR fields indexed, but the plan
reads:
PLAN JOIN (BASEAPPLICATIONS NATURAL,APPLICATIONS INDEX
(APPLICATIONS_IDX2,APPLICATIONS_IDX3))
Index2 and 3 are the MODEL and YEAR fields. Why isn't it using the MAKE
index?
Kevin Lingofelter