<div dir="ltr">ok thanks,<div><br></div><div>I have disabled the check_temp_table as we don&#39;t use temp tables which removes the pg_temp queries, however there is still alot of queries for SELECT count(*) FROM pg_catalog.pg_class AS c WHERE c.relname = &#39;table&#39; AND c.relpersistence = &#39;u&#39; to me this seems like a check to see if the table exists, is there a way to cache this ?</div>
</div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><div style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><span style="color:rgb(34,34,34)"><b>Nathan Brennan</b> </span><span style="color:rgb(34,34,34)"><i>BCS</i></span><div>
<span style="color:rgb(34,34,34)">Lead Developer</span></div><div><br></div><div><b>T:</b> <a value="+61894823986" style="color:rgb(17,85,204)">+61 8 9482 3981</a> | <b>E:</b> <a href="mailto:nathan@healthengine.com.au" style="color:rgb(17,85,204)" target="_blank">nathan@healthengine.com.au</a><div>
<div style="color:rgb(34,34,34)"><br></div><div style="color:rgb(34,34,34)"><a href="http://healthengine.com.au/" style="color:rgb(17,85,204)" target="_blank"><img src="http://healthengine.com.au/images/emailsig-helogo.png"></a>     <a href="https://twitter.com/healthengine" style="color:rgb(17,85,204)" target="_blank"><img src="http://healthengine.com.au/images/emailsig-twitter.png"></a>  <a href="https://www.facebook.com/HealthEngine" style="color:rgb(17,85,204)" target="_blank"><img src="http://healthengine.com.au/images/emailsig-facebook.png"></a><br>
</div></div></div><div style="color:rgb(34,34,34)"><br></div><div style="color:rgb(34,34,34)"><img src="http://healthengine.com.au/images/emailsig-no1.png"></div></div></div></div>
<br><br><div class="gmail_quote">On Wed, Dec 4, 2013 at 12:51 PM, Tatsuo Ishii <span dir="ltr">&lt;<a href="mailto:ishii@postgresql.org" target="_blank">ishii@postgresql.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">&gt; Hi,<br>
&gt;<br>
&gt; Is there a way to cache these queries or turn them off as pgpool is doing<br>
</div>&gt; thousands of them a second.I tried setting relcache_expire=60 but it<br>
<div class="im">&gt; doesn&#39;t seem to help.<br>
&gt;<br>
&gt; example queries:<br>
&gt;<br>
&gt; SELECT count(*) FROM pg_class AS c, pg_namespace AS n WHERE c.relname =<br>
&gt; &#39;table&#39; AND c.relnamespace = n.oid AND n.nspname = &#39;pg_catalog&#39;<br>
&gt;  SELECT count(*) FROM pg_class AS c, pg_namespace AS n WHERE c.relname =<br>
&gt; &#39;table&#39; AND c.relnamespace = n.oid AND n.nspname ~ &#39;^pg_temp_&#39;<br>
<br>
</div>You can avoid temp table related queries by turning check_temp_table<br>
to off (of course you need to be sure that you are not using temp<br>
tables).<br>
<br>
Also relcache_expire = 0 will be more effective if you want to reduce<br>
the number of queries.<br>
--<br>
Tatsuo Ishii<br>
SRA OSS, Inc. Japan<br>
English: <a href="http://www.sraoss.co.jp/index_en.php" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
Japanese: <a href="http://www.sraoss.co.jp" target="_blank">http://www.sraoss.co.jp</a><br>
</blockquote></div><br></div>