June 19, 2013

Post: Rotating MySQL slow logs safely

log rotation. Putting it all together Here is a logrotate configuration file for a slow log that illustrates these best practices: /var/mysql/slow_query.log… @@global.long_query_time into @lqt_save; set global long_query_time=2000; select sleep(2); FLUSH LOGS; select sleep(2); set global long_query

Comment: Rotating MySQL slow logs safely

set the “slow_query_log_use_global_control” in 5.5 or “use_global_log_slow_control” in 5.1 in 1 and the server will use the global…#use_global_log_slow_control PS 5.5 http://www.percona.com/doc/percona-server/5.5/diagnostics/slow_extended_55.html#slow_query_log_use_global_control…

Comment: Rotating MySQL slow logs safely

… postrotate stanza 2a. Slow logging is paused (set global long_query_time=2000;) 2b. There is a small wait for buffered logs to be flushed (select sleep(2);) 2c. File handles are reopened (FLUSH LOGS ;) 2d. Slow logging resumed (set global long_query_time=@lqt…

Comment: Rotating MySQL slow logs safely

Hi, Martin, Andrew, you are right on these. You can also use SET GLOBAL slow_query_log = on|off to turn slow log on and off, like Bill does in his tool here. http://www.mysqlperformanceblog.com/2012/11/22/get-me-some-query-logs/

Post: Finding what Created_tmp_disk_tables with log_slow_filter

… then set the filter to an empty string to stop collection. SET GLOBAL log_slow_filter:=”"; Then it was just a question of examining the slow query log and fixing the queries. More information about…

Post: Updated msl (microslow) patch, installation walk-through!

… time with both SET SESSION and SET GLOBAL. log_slow_rate_limit=# Rate limit statement writes to slow log to only those from every (1/log_slow_rate_limit… SET GLOBAL. log_slow_verbosity=name Choose how verbose the messages to your slow log will be. Multiple flags allowed in a comma-separated string. [microtime, query

Comment: Get Me Some Query Logs!

… these settings to populate slow query log: set global log_slow_sp_statements=1; set global log_slow_verbosity=”full”; set global long_query_time=0; set global slow_query_log_timestamp_always=1; set global slow_query_log_timestamp_precision=”microsecond”; set global slow_query_log_use_global_control…

Post: Microslow patch for 5.1.20

settinglog-slow-queries=slow.log and –log-output=FILE. Also you need to configure so called long query time. It’s done either with startup parameter –long_query…by setting MySQL system variable with SET [SESSION|GLOBAL] long_query_time=n. The value is in microseconds (0 means to log all queries

Post: The new cool MySQL patch has landed! Check your queries performance!

slow log any queries executed by the slave’s SQL thread. This patch allows you to change that behavior with the new parameter –log-slowglobal and shared by all the threads. The patch gives you the opportunity to see those values for a given query

Comment: Database problems in MySQL/PHP Applications

… this file to # /etc/my.cnf to set global options, # mysql-data-dir/my.cnf to set server-specific options (in this # installation…_length=2048 long-query-time=5 log-slow-queries=/apps/log/slow-query interactive_timeout=300 wait_timeout=300 thread_cache = 40 max_connections=500 query_cache_size…