notes/postgres.md
Paul Trowbridge 3c8a2adb31 format
2018-09-07 17:30:38 -04:00

616 B

setup for single sign on with SSPI

md5 hash is salted with username in front

Memory

see whats in the buffer cache with pg_buffercache

CREATE EXTENSION pg_buffercache

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;