Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

How to determine SQL Plan Cache Size?

$
0
0

Hi Everyone,

 

In our HANA production box, we are getting the below alert:

"96292 plan cache evictions occured on host hana, port 30003" and the recommendation HANA is showing is "To increase size of plan cache"

 

At present the plan cache size is default i.e. 2 GB

 

I found below three notes related to SQL plan cache

 

As per SAP Note 2124112 ,  HANA Mini Check with Check ID 1130 stands for SQL cache evictions

 

SAP Note "1977253 - Determines whether or not the plan cache is too small" seems relevant but is not yet released

 

I also checked SAP Note "2040002 - Size recommendation for the HANA SQL Plan Cache"

 

This note says if any of the following conditions is true in your system, please increase the plan cache capacity as outlined below:

 

1. "If CACHED_PLAN_SIZE is bigger than PLAN_CACHE_CAPACITY, newly compiled plans cannot be cached at all. In this case, you must increase your cache capacity"

-> In our HANA System, PLAN_CACHE_CAPACITY is greater than CACHED_PLAN_SIZE

 

2. "In an equilibrated system, the PLAN_CACHE_HIT_RATIO is lower than 90% (introduced in SP7)"

-> In our HANA system PLAN_CACHE_HIT_RATIO is lower than 90% for indexserver, so the second condition is satisfied

 

As per the Note, for Non-ABAP system,

plan_cache_size = 0.90 x (current PLAN_CACHE_CAPACITY)/(current PLAN_CACHE_HIT_RATIO)

 

For ABAP system,

plan_cache_size = # of SQL connections x 15 MB

 

We are running HANA in a Sidecar Scenario and also using HANA Accelerators so in a way, we also have a ABAP stack on top of HANA

 

So how should we determine the plan cache size?

 

Regards,

Vivek


Viewing all articles
Browse latest Browse all 6412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>