GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Oracle  >  Memory Management

 Print  |  
Question:  What are the factors causing the reparsing of SQL statements in SGA



September 09, 2005 11:19:40 #3
 praim Sankar   Member Since: Visitor    Total Comments: N/A 

RE: What are the factors causing the reparsing of SQL statements in SGA
 
The Library Cache was introduced because parsing (and validating and checking privileges) is expensive in terms of CPU cycles.  
 
Oracle uses a LRU/MRU mechanism to keep sql statements in cache. When more room is needed in the cache Oracle drops off the LRU block. 
When a sql statement is executed Oracle checks the library cache first. If it finds it then there is no need to reparse and it is a hit. 
If the statement does not exist in cache then it's a miss and oracle needs to read the data from the data blocks. The statement will be parsed.
     

 

Back To Question