Search notes:

Oracle: Library Cache

The library cache is a component of the Shared Pool which itself is a component of the SGA.
The library cache was introduced because parsing, validating and checking privileges of SQL statements is expensive in terms of CPU cycles.
The cache stores the results of a parsed SQL statement so that (the same) SQL statement can be executed multiple times (without having to re-parse it).
The library cache consists of
The library cache is divided into namespaces (or libraries) which can be queried with:
select namespace from v$librarycache;
select kglstdsc  from x$kglst;

See also

In versions prior to 10g, using dbms_stats.gather_table_stats would invalidate a cursor (i. e. remove the associated data from the library cache and cause a hard parse for the purged statements.
This behavior can now be controlled with the paramter no_invalidate of the dbms_stats packages.
The dynamic performance views
The fixed tables x$kqlset and x$kglxs

Index