<div dir="auto">Hi thanks.</div><div dir="auto"><br></div><div dir="auto">But in case I have very large result that I want to store in the cache how I should calculate the cache total size? </div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 27 Jun 2022 at 8:27 Tatsuo Ishii <<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">> Do you know what is the best formula to calculate the cache size when using<br>
> shared memory, in case I want a greater query result size.<br>
> <br>
> How do I address to the block size and the number of cache entries?<br>
<br>
Unless your queries return very large results, usually you don't need<br>
to adjust the cache block size.<br>
<br>
For the number of cache entries (num_hash_entries), you should consult<br>
"show pool_cache" command. Here are some advices:<br>
<br>
- If cache_hit_ration is good enough (for example over 0.9), then you<br>
  do not need to adjst num_hash_entries.<br>
<br>
- If cache_hit_ration is not good, try to increase num_hash_entries so<br>
  that pgpool can hold more cache entries. However, it is possible<br>
  that the cache hit ratio won't be better because your system is<br>
  write heavy. In this case you should think more if you really want<br>
  to use the cache system.<br>
<br>
Good luck!<br>
--<br>
Tatsuo Ishii<br>
SRA OSS, Inc. Japan<br>
English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
</blockquote></div></div>