Skip to content

Instantly share code, notes, and snippets.

@tlkshadow
Last active December 8, 2019 17:03
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 tlkshadow/fd23c8478caaf4ff997d888b26457bd9 to your computer and use it in GitHub Desktop.
Save tlkshadow/fd23c8478caaf4ff997d888b26457bd9 to your computer and use it in GitHub Desktop.
-- Performance check if the index is hit
SET @start_time = NOW();
SELECT * FROM products WHERE is_deleted = 0 AND status = 'ordered';
SET @end_time = NOW();
 
SELECT TIMEDIFF(@end_time, @start_time) AS difference;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment