Skip to content

Instantly share code, notes, and snippets.

@ronaldbradford
Created October 11, 2016 15:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ronaldbradford/b0ab38a5b56f02cdb53956731665ff66 to your computer and use it in GitHub Desktop.
Save ronaldbradford/b0ab38a5b56f02cdb53956731665ff66 to your computer and use it in GitHub Desktop.
SELECT EVENT_ID,
TRUNCATE(TIMER_WAIT/1000000000000,6) AS duration,
current_schema, sql_text
FROM performance_schema.events_statements_history_long
WHERE sql_text IS NOT NULL
AND current_schema != 'performance_schema'
ORDER BY duration DESC
LIMIT 10;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment