SQL Language (MOSC)

MOSC Banner

EXISTS and TABLE ACCESS FULL

edited Oct 15, 2012 4:14AM in SQL Language (MOSC) 4 commentsAnswered ✓
 Hello everybody,
I was asked a question about how the EXISTS condition functions in a specific context. 
Given the query "select 1 from dual where exists (select * from trip where trip_id = 6485);", does the whole trip table always get scanned in full, even if a matching record is found before all the records of the table are fetched?
So I searched Oracle's documentation but was unable to find an exact answer. However, the execution plan - when compared to a plan where the table actually gets fully scanned - seems to indicate that the whole table is not necessarily scanned.
Still, I would like to know if their is an "official" answer to this.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center