Created
May 16, 2016 14:13
-
-
Save Madusudanan/f02ebba386164b500e5c9cb15cd7f8a6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT c.relname,count(*) AS buffers | |
FROM pg_class c INNER JOIN pg_buffercache b | |
ON b.relfilenode=c.relfilenode INNER JOIN pg_database d | |
ON (b.reldatabase=d.oid AND d.datname=current_database()) | |
GROUP BY c.relname | |
ORDER BY 2 DESC LIMIT 100; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment