SQL Engine - Hard Parse (Library cache miss)

Table of Contents

1 - About

During the sql parsing (which is a step of the sql processing), if the Database (for instance Oracle) cannot reuse existing code, then it must build a new executable version of the application code (ie a cursor).

This operation is known as a hard parse, or a library cache miss in Oracle.

The database always perform a hard parse of DDL.

During the hard parse, the database accesses the library cache and data dictionary cache numerous times to check the data dictionary.

When the database accesses these areas, it uses a serialization device called a latch on required objects so that their definition does not change. Latch contention increases statement execution time and decreases concurrency.

The database must perform a hard parse at least once for every unique DML statement and performs optimization during this parse. DDL is never optimized unless it includes a DML component such as a subquery that requires optimization.

Data Science
Data Analysis
Data Science
Linear Algebra Mathematics

Powered by ComboStrap