[pgpool-general: 2324] Re: thousands of queries to pg_class / second

Tatsuo Ishii ishii at postgresql.org
Wed Dec 4 13:51:08 JST 2013


> Hi,
> 
> Is there a way to cache these queries or turn them off as pgpool is doing
> thousands of them a second.I tried setting relcache_expire=60 but it
> doesn't seem to help.
> 
> example queries:
> 
> SELECT count(*) FROM pg_class AS c, pg_namespace AS n WHERE c.relname =
> 'table' AND c.relnamespace = n.oid AND n.nspname = 'pg_catalog'
>  SELECT count(*) FROM pg_class AS c, pg_namespace AS n WHERE c.relname =
> 'table' AND c.relnamespace = n.oid AND n.nspname ~ '^pg_temp_'

You can avoid temp table related queries by turning check_temp_table
to off (of course you need to be sure that you are not using temp
tables).

Also relcache_expire = 0 will be more effective if you want to reduce
the number of queries.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp


More information about the pgpool-general mailing list