Skip to content

Instantly share code, notes, and snippets.

@Whitespace
Created April 15, 2015 19:14
Show Gist options
  • Select an option

  • Save Whitespace/9d60a81c5739fa0caa18 to your computer and use it in GitHub Desktop.

Select an option

Save Whitespace/9d60a81c5739fa0caa18 to your computer and use it in GitHub Desktop.

Revisions

  1. Whitespace created this gist Apr 15, 2015.
    1 change: 1 addition & 0 deletions long_running_transactions.sql
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    SELECT userid, dbid, left(query, 100), total_time, rows FROM pg_stat_statements WHERE total_time >= 1000 ORDER BY total_time DESC;