Re: Fast 3 Table Join
Posted by:
Rick James
Date: March 22, 2012 10:01PM
> Table B has two columns (idA, idC)
That's a "many to many" relationship between the other two table. It needs
PRIMARY KEY (idA, idC)
and possibly
INDEX(idC, idA)
(depending on what your SELECTs really look like.
Why are there fewer 'relations' than there are rows in A and C? Are most of A and C not linked to each other?
This will give you 25 million rows; that takes a long time:
SELECT *
FROM A,B,C
WHERE A.idA = B.idA AND C.idC = B.idC
Do you ever really need to fetch all of them?
Subject
Written By
Posted
Re: Fast 3 Table Join
March 22, 2012 10:01PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.