rajannagpal
asked on
does Cartesian product happens each time we execute joins
Hi guys
Does the oracle always does the cartesian product before filtering out the records based on join condition
For example
select * from category_new, category_temp where
category_new.category = category_temp.category
what will happen in this case will the oracle behind the scene fetch all the records from both the tables, then perform cartesian product and then apply equi join.
Is this the case that oracle will perform cartesian product each time we ask for join ?
Does the oracle always does the cartesian product before filtering out the records based on join condition
For example
select * from category_new, category_temp where
category_new.category = category_temp.category
what will happen in this case will the oracle behind the scene fetch all the records from both the tables, then perform cartesian product and then apply equi join.
Is this the case that oracle will perform cartesian product each time we ask for join ?
ASKER
I run the explain plan and reach the conclusion that oracle always perform cartesian product. I was suspicious about the result that why i need to verify.
so question is if we dont have indexes and assume we are going by book then what will happen, will it perform the cartesian product ?
so question is if we dont have indexes and assume we are going by book then what will happen, will it perform the cartesian product ?
yes.
this is why indexes are crutial, the bigger the table, the more important they are.
this is why indexes are crutial, the bigger the table, the more important they are.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
functionally, yes. however, technically, depending on the indexes you have on the tables, it will perform either a index-based row-lookup, a merge join, etc.
run the explain plan for the query, and you will know.