Oracle SQL theory

v$sql contains SQL statements cached in 'Library Cache' in 'System Global Area(SGA)'.
Soft parse - the SQL statement is already found in the library cache by hashing.
Hard parse - the SQL statement is not in the library cache, need parse the SQL, genereate the execution plan, update the library cache (need acquire the 'Latches (like spin lock)' to exculsivly update the lib cache area).
Logic read - if the data is already in the SGA.
Physical read - if the data is not in the SGA, need access physical disk to get the data and then update SGA if necessary (again need hold the Latches when updating the SGA).
 
Nested Loops (Usually Good) -
Filter (Usually Bad) -

你可能感兴趣的:(Oracle SQL theory)