Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> I just want to join to one more table!

I just want to join to one more table!

From: <jimbo1155_at_my-deja.com>
Date: Wed, 27 Dec 2000 21:12:37 GMT
Message-ID: <92dlvu$tlv$1@nnrp1.deja.com>

I have a query that joins to several tables, and becomes very inefficient. It basically looks likes what's below. Now, activity has about 4m rows, and the contact records have about 1m each. The query takes about 80 seconds.
If I remove either contactaddress or contactphone, it goes down to 6 seconds.

I've tried using subqueries, thinking that the subqueries will execute independent of anything else, but that doesn't seem to be the case.

Do you think it's the nature of the query? Or perhaps I've hit some memory limit where resources have suddenly gotten scarce.

select

    contact.name
    contactaddress.address
    contactphone.phone

from

    activity,
    contact,
    contactaddress,
    contactphone
where

    activity.id = 1
    and activity.cid = contact.cid
    and contact.aid = contactaddress.aid     and contact.aid = contactphone.aid

Sent via Deja.com
http://www.deja.com/ Received on Wed Dec 27 2000 - 15:12:37 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US