Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@mpneuried
Last active July 27, 2016 13:11
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 mpneuried/6037010 to your computer and use it in GitHub Desktop.
Save mpneuried/6037010 to your computer and use it in GitHub Desktop.
SQL HELPERS :: SQL commands i allways have to search for
/* activate global logging and the logfile path*/
SET GLOBAL general_log = 'ON';
SET GLOBAL general_log_file = '/Users/mathiaspeter/logs/mysql_general.log';
/* deactivate global logging */
SET GLOBAL general_log = 'OFF';
/* show variables */
SHOW GLOBAL VARIABLES like '%log%';
/* benchmark a sql query */
SELECT BENCHMARK(100000,(
SELECT 1
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment