<div dir="ltr">ok thanks,<div><br></div><div>I have disabled the check_temp_table as we don'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 = 'table' AND c.relpersistence = 'u' 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"><<a href="mailto:ishii@postgresql.org" target="_blank">ishii@postgresql.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">> Hi,<br>
><br>
> Is there a way to cache these queries or turn them off as pgpool is doing<br>
</div>> thousands of them a second.I tried setting relcache_expire=60 but it<br>
<div class="im">> doesn't seem to help.<br>
><br>
> example queries:<br>
><br>
> SELECT count(*) FROM pg_class AS c, pg_namespace AS n WHERE c.relname =<br>
> 'table' AND c.relnamespace = n.oid AND n.nspname = 'pg_catalog'<br>
>  SELECT count(*) FROM pg_class AS c, pg_namespace AS n WHERE c.relname =<br>
> 'table' AND c.relnamespace = n.oid AND n.nspname ~ '^pg_temp_'<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>