Re: Query Plan
Originally posted by ADBA007
Query Plan in DB Instance 1:
Query Plan
------------------------------------------------------
SELECT STATEMENT Cost = 1180
HASH JOIN
TABLE ACCESS FULL Table_AAA
TABLE ACCESS FULL Table_BBB
Query Plan in DB Instance 2:
Query Plan
-----------------------
SELECT STATEMENT Cost = 1468
HASH JOIN
TABLE ACCESS FULL Table_BBB
TABLE ACCESS FULL Table_AAA
What difference it makes for an HASH JOIN operation if the table order are reveresed???.. Ofcourse if does a little bit for below 2 cases..
* Either of the tables is too small compared to other.
* Either of the tables involved have a limiting condition in the query which makes it virtually very small then other.
Well in your case it might not be the case, so oracle is thinking its immaterial if tab Table_AAA comes first or Table_BBB comes first ( For hashing the contents to be joined )..
Abhay.
funky...
"I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."
"Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"
Bookmarks