Skip to content

Instantly share code, notes, and snippets.

Jay El-Kaake jayelkaake

Block or report user

Report or block jayelkaake

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jayelkaake
jayelkaake / locks.sql
Last active Oct 23, 2018 — forked from izbor/locks_and_blocking.sql
PSQL Useful Queries
View locks.sql
-- See summary of table sizes (index and storage sizes) sorted by largest size to smallest size
SELECT
table_name,
pg_size_pretty(table_size) AS table_size,
pg_size_pretty(indexes_size) AS indexes_size,
pg_size_pretty(total_size) AS total_size,
ROUND(indexes_size/1024/1024) as indexes_size_mb,
ROUND(table_size/1024/1024) as table_size_mb,
ROUND(total_size/1024/1024) as total_size_mb
FROM (
You can’t perform that action at this time.