Skip to content

Instantly share code, notes, and snippets.

View marcintustin's full-sized avatar

marcintustin

View GitHub Profile
@marcintustin
marcintustin / postgres_queries_and_commands.sql
Last active February 9, 2023 19:19 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show *blocked* queries (not the same as idle)
SELECT
pid,
usename,
pg_stat_activity.query_start,
now() - pg_stat_activity.query_start AS query_time,
query,
state,
wait_event_type,
wait_event