What is hard parsing?

Please Like Us!!!

LoadRunner Interview Questions

Q: What is hard parsing?
A: If a session executes a SQL statement that does not exist in the shared pool, then database has to do a hard parse. Database must then:
1) Allocate memory for the statement from the shared pool.
2) Check the statement syntactically
3) Check if the user trying to execute the statement has the necessary rights to execute it

A hard parse is expensive in both terms of CPU used and number of shared pool latch and library cache latch it needs to acquire and release. It should be avoided whenever possible. Hard parsing could lead to increase in the response time of a transaction. If hard parsing occurs too often then database optimization is required.

Reviews & Comments