Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: I just want to join to one more table!
In article <92do2r$vit$1_at_nnrp1.deja.com>,
jdarrah_co_at_my-deja.com wrote:
> what does the explain plan show for both queries?
Ok, I'm new, but this shows me where to dig. My actual sql is below.
When I run explain plan it says that it's doing table access full on
contactphone and contactaddress even though there are indexes on the
columns I'm joining on.
SELECT
ICOUNT,
TELESALES.CONTACT.LASTNAME, TELESALES.CONTACT.FIRSTNAME, TELESALES.CONTACTADDRESS.ADDRESS, TELESALES.CONTACTADDRESS.CITY, TELESALES.CONTACTADDRESS.STATE, TELESALES.CONTACTADDRESS.ZIP, TELESALES.CONTACTPHONE.PHONE
TELESALES.ACTIVITY , TELESALES.CAMPAIGN WHERE TELESALES.CAMPAIGN.CAMPAIGNNAME = 'CommunityLink' AND ( TELESALES.ACTIVITY.CAMPAIGNID=TELESALES.CAMPAIGN.CAMPAIGNID ) AND TELESALES.ACTIVITY.ACTIVITYTIME BETWEEN next_day(to_date('01-12-2000 00:00:00','DD-MM- YYYY HH24:MI:SS')-6,'Sunday') AND next_day(to_date('10-12-2000 00:00:00','DD-MM-YYYY HH24:MI:SS')-6,'Sunday') GROUP BY TELESALES.ACTIVITY.CONTACTID ) ,
Sent via Deja.com
http://www.deja.com/
Received on Thu Dec 28 2000 - 07:47:05 CST