Friday 26 February 2016

Library cache latch

Possible Causes:
  •         The library cache latches protect the cached SQL statements and objects definitions held in the library cache within the shared pool. The library cache latch must be acquired in order to add a new statement to the library cache.
  •         Application is making heavy use of literal SQL- use of bind variables will reduce this latch considerably.


Actions:
  •         Latch is to ensure that the application is reusing as much as possible SQL statement representation. Use bind variables whenever possible in the application.
  •         You can reduce the library cache latch hold time by properly setting the SESSION_CACHED_CURSORS parameter.
  •         Consider increasing shared pool.


Remarks:
  •         Larger shared pools tend to have long free lists and processes that need to allocate space in them must spend extra time scanning the long free lists while holding the shared pool latch.
  •         if your database is not yet on Oracle9i Database, an oversized shared pool can increase the contention for the shared pool latch.

No comments: