Skip to content

Instantly share code, notes, and snippets.

@mgax
Created March 16, 2017 06:25
Show Gist options
  • Save mgax/ca3710a97bdc7a5ce4f98443fae37d1f to your computer and use it in GitHub Desktop.
Save mgax/ca3710a97bdc7a5ce4f98443fae37d1f to your computer and use it in GitHub Desktop.

postgres cheat sheet

active queries

SELECT pid, now() — query_start AS duration, query, state FROM pg_stat_activity;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment