![apex sql caching too aggressively apex sql caching too aggressively](https://slidetodoc.com/presentation_image_h/0fcf83caf3c608ebffaf6ae58adb5aa5/image-24.jpg)
Lookup into the library cache only tells oracle that the cursor is available over there or not for being reused and if its available, whether it can be reused eventually or not( there are conditions when the cached cursor too won’t get reused, atleast not right away).Ī little more closer look at Library CacheĪs I mentioned, this post is not going to be the place of the interpertation of the dumps of the library cache so we won’t be going too deep but to that extent only which is relevant to make up an base. To store the already executed cursor, oracle uses a memory area called Library Cache which essentially is part of its parent memory area, Shared Pool. This step is called Soft parse of the query. With the subsequent executions of the same cursor, Oracle must only pick up the already cached cursor and just run it. The recommendation is that this step must not be repeated all the time when the query gets executed. This first time optimization is called Hard Parsing of the query. The first time is hard to avoid as oracle knows nothing about the query, so there is no way out othere than optimizing the query. This step is necessary to do for the first time but must not be repeated all the times when the query is executed. The optimization is nothing but the steps that are needed to understand the query in a better way and prepare a plan to run the query aka, execution plan. When we run a query, oracle runs the query with the optimization of it. This post is certainly not all about library cache but a collection of replies that I did over there.
![apex sql caching too aggressively apex sql caching too aggressively](https://www.apexsql.com/sliderslick/images/UnitTest/New_test.png)
Seeing that and replied over the threads, I thought to put some relevant information about library cache over here. They were not really focussed about internals of the library cache but they were seeking clarification about the terminoligy that is used to interpret the output of the it.
![apex sql caching too aggressively apex sql caching too aggressively](https://svenweller.files.wordpress.com/2016/07/apex5_sessiontimer_instanceadmin.png)
In the last week, there were couple of questions targetting a similar topic, library cache.