GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  Memory Management
Go To First  |  Previous Question  |  Next Question 
 Memory Management  |  Question 5 of 114    Print  
What are the factors causing the reparsing of SQL statements in SGA

  
Total Answers and Comments: 4 Last Update: October 13, 2005   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
July 28, 2005 12:03:46   #1  
Satyavani        

RE: What are the factors causing the reparsing of SQL statements in SGA
When a SQL query is executed it follows the following steps:

1) Search the shared pool. This is to ensure that the copy of the parsed statement is available in the library cache.
2) Validate the statement
3) Validate the data source
4) Acquire locks
5) Check privileges
6) Parse the statement
7) Execute the statement
8) Fetch values from cursor.

In case the parse tree is not available in the library cache it needs to reparse the statement.

Thanks
satyavani

 
Is this answer useful? Yes | No
August 24, 2005 09:28:21   #2  
Shrikant Pande        

RE: What are the factors causing the reparsing of SQL statements in SGA
If SGA is not properly sized it caused reparse Oracle checks data in buffer cache first if it is not found it goes to datafile. if SGA sized properly oracle will get data in buffer and reparse wil not accur
 
Is this answer useful? Yes | No
September 01, 2005 11:19:40   #3  
praim Sankar        

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.

 
Is this answer useful? Yes | No
October 13, 2005 16:02:47   #4  
sandeep vig        

RE: What are the factors causing the reparsing of SQL ...

there are main two causes for reparsing

1)the objects which the query is refrencing has been modified

2) or the parsed version of sql text has been aged out of the library cache.


 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape