Tag Info

New answers tagged


I use this query to show disk x cache hits: -- perform a "select pg_stat_reset();" when you want to reset counter statistics with all_tables as ( SELECT * FROM ( SELECT 'all'::text as table_name, sum( (coalesce(heap_blks_read,0) + coalesce(idx_blks_read,0) + coalesce(toast_blks_read,0) + coalesce(tidx_blks_read,0)) ) as from_disk, ...


Let's see if you have issues with table_open_cache: SHOW VARIABLES LIKE 'table%cache'; SHOW GLOBAL STATUS LIKE '%open%'; SHOW GLOBAL STATUS LIKE 'Up%'; How many tables do you have in the system (not just the one database)? FOREIGN_KEYs need to reach into an index of the 'other' table. This is usually the cost penalty for FKs. However all such accesses ...

Top 50 recent answers are included