Database Reference
In-Depth Information
Step 2
Create the function in the respective schema by executing the definition from Step 1. After the function is created,
execute the function
SELECT totalbalance(10) FROM DUAL;
Step 3
Validate the result cache section and see what has changed.
SQL> execute DBMS_RESULT_CACHE.MEMORY_REPORT(TRUE);
R e s u l t C a c h e M e m o r y R e p o r t
[Parameters]
Block Size = 1K bytes
Maximum Cache Size = 14432K bytes (14432 blocks)
Maximum Result Size = 721K bytes (721 blocks)
[Memory]
Total Memory = 176312 bytes [ 0.039% of the Shared Pool ]
... Fixed Memory = 12360 bytes [0.003% of the Shared Pool]
....... Memory Mgr = 208 bytes
....... Cache Mgr = 256 bytes
....... = 680 bytes
....... Bloom Fltr = 2K bytes
....... RAC Cbk = 6240 bytes
....... State Objs = 2928 bytes
... Dynamic Memory = 163952 bytes [0.036% of the Shared Pool]
....... Overhead = 131184 bytes
........... Hash Table = 64K bytes (4K buckets)
........... Chunk Ptrs = 24K bytes (3K slots)
........... Chunk Maps = 12K bytes
........... Miscellaneous = 131184 bytes
....... Cache Memory = 32K bytes (32 blocks)
........... Unused Memory = 29 blocks
........... Used Memory = 3 blocks
............... Dependencies = 2 blocks (2 count)
............... Results = 1 blocks
................... PLSQL = 1 blocks (1 count)
One execution of the query has changed the memory report. 0.036% of the dynamic memory section of the
shared pool has been allocated to the result cache section to store three blocks of data. Similar to the discussion in
the previous workshop on result cache, two blocks are allocated to the dependent object that is part of the query
( CUSTOMER) and one block is allocated to the result set of the query. The PL/SQL block is identified in the result cache.
The V$RESULT_CACHE_OBJECTS view gives the basic information pertaining to the function and its results. The
output lists one dependency and one result. The result also contains information such as the number of columns and
the total number of rows in the result set.
 
Search WWH ::




Custom Search