Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Full table scan in execution plan on a simple query

LvNov 16 2017 — edited Nov 17 2017

Dear all,

I have two tables: 2_MASTER(master_id, child_id) containing 44M rows, and Z_CHILD(child_id, attribute_1, attr_2, attr_3, attr_4) containing 74M rows. I have the following indexes defined:

MASTER(master_id, child_id)

MASTER(child_id, master_id)

CHILD(child_id)

CHILD(attr_1)

CHILD(attr_2, attr_3, attr_4)

The two tables have up to date statistics. I'm running oracle 12.1.

When I issue the following query:

SELECT

r.*

FROM

Z_MASTER rc

JOIN

Z_CHILD r

ON r.child_id = rc.child_id

WHERE

rc.master_id = 13966164 ;

I got the following execution plan (from SQL Developer):

pastedImage_1.png

My query seems to run fast, as expected, so currently I have no particular performance issue.

Can someone shed some light on why there is a HASH JOIN between the actual result of the query and a TABLE ACCESS (FULL) ? I'm not comfortable with interpreting plans, which probably explains my misunderstanding here. It seems to me that the first nested loop is doing the job... I don't understand why there is an extra one involving a full table scan (with cardinality of 1).

Thanks

This post has been answered by ddf_dba on Nov 16 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 15 2017
Added on Nov 16 2017
12 comments
3,713 views