Hello Hans, Thanks for your reply. Yes, we are facing performance issue. Current output of query is: postgres=# SELECT pg_stat_database.datname, postgres-# pg_stat_database.blks_read, postgres-# pg_stat_database.blks_hit, postgres-# round((pg_stat_database.blks_hit::double precision postgres(# / (pg_stat_database.blks_read postgres(# + pg_stat_database.blks_hit postgres(# +1)::double precision * 100::double precision)::numeric, 2) AS cachehitratio postgres-# FROM pg_stat_database postgres-# WHERE pg_stat_database.datname !~ '^(template(0|1)|postgres)$'::text postgres-# ORDER BY round((pg_stat_database.blks_hit::double precision postgres(# / (pg_stat_database.blks_read postgres(# + pg_stat_database.blks_hit postgres(# + 1)::double precision * 100::double precision)::numeric, 2) DESC; datname | blks_read | blks_hit | cachehitratio --------------+-----------+-----------+--------------- kbcc_eng_ret | 1192 | 269999 | 99.56 nagios | 178 | 37185 | 99.52 kccm | 1431 | 214501 | 99.34 kbbm | 1944006 | 157383222 | 98.78 Thanks, Daulat From: Hans Schou <hans.schou@xxxxxxxxx>
Try run postgresqltuner.pl as suggested on
https://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server and also look at the other info there. After running a few days with live data run cache_hit_ratio.sql by Melvin Davidson: SELECT pg_stat_database.datname,
The real question is: Is your system slow? On Sun, Jun 30, 2019 at 5:14 AM Daulat Ram <Daulat.Ram@xxxxxxxxxxxxxxx> wrote:
|