… valuable information: SET GLOBAL slow_query_log=1; SET GLOBAL long_query_time=0; With long_query_time we are logging all queries that are being executed in our database. After capturing enough data and copying the slow query log to…
Post: Microslow patch for 5.1.20
… enable slow logging with –slow-query-log parameter. MySQL 5.1 has this nice feature which allows you to redirect query log (it’s actually called general log now) and slow log…
Post: How To Test Your Upgrades - pt-upgrade
…. Capture your production queries, we recommend either slow query log (use long_query_time = 0) or tcpdump (other types supported by pt-query-digest’s –type…. Using slow query log: # You can also run the slow log through pt-query-digest like the commands below # to limit the number of queries per fingerprint…
Post: Estimating Replication Capacity
… or other interval of your choice. 2) Use full slow query log and mk-query-digest. This method is great for one time execution… long_query_time=0 and log_slave_slow_statements=1 for this method to work. Get the log file which will include all queries MySQL server ran with their times and run mk-query-digest with filter to only check queries from replication thread: mk-query-digest slow-log…
Comment: New Forum Categories: Help Wanted, For Hire
…=/home/mysqld/mdmp/tmp slow_query_log=mdmp_slow_queries.log # binary logging and replication binlog_cache_size=1M binlog_format=MIXED log-slave-updates log-bin=mdmp_freehold…=/home/mysqld/mdmp/tmp slow_query_log=mdmp_slow_queries.log # binary logging and replication binlog_cache_size=1M binlog_format=MIXED log-slave-updates log-bin=mdmp_boonton…
Comment: Get Me Some Query Logs!
… gather logs from the mysql.slow_query log, but you can export the data into a format that’s compatible with file-based slow query log. In… my full-slow-log script. The script to export the slow-query log table is called “export-slow-log-table”. Another drawback of the table-based slow query log, in…
Comment: Get Me Some Query Logs!
… clues appreciated
./full-slow-log -v Discovering slow_query_log=1 Discovering slow_query_log_file=/var/log/mysqld_slow.log Discovering long_query_time=1.000000 Setting long_query_time=0 ERROR 1231 (42000) at line 1: Variable ‘slow_query_log…
Post: Find unused indexes
… index from the slow query log. The concept is easy to understand. pt-index-usage reads the slow query log and execute every query with EXPLAIN to… an example: root@debian:/var/log# pt-index-usage slow.log slow.log: 11% 03:58 remain slow.log: 21% 03:43 remain slow.log: 32% 03:09 remain… plan. pt-index-usage tries to convert non-SELECT queries to SELECT queries and is not always possible to get a perfect…
Post: Impact of logging on MySQL’s performance
… how much logging impacts on performance. When we do performance audit often we log every query to find not only slow queries. A query may take less than a second to execute, but a huge number of such queries… are two conclusions can be made: It is safe to log slow queries with execution time bigger than a second without worry about…
Post: Profiling MySQL stored routines
… was – I’ll just analyze queries in the slow query log generated by our mysql build running with long_query_time=0, get the slowest…’s call it and see what shows up in the slow query log: mysql> SELECT whatstheweatherlike(5); +———————————————————-+ | whatstheweatherlike(5) | +———————————————————-+ | Its 5°C, time… this query SELECT whatstheweatherlike(5); Not overly useful for query optimization, is it? Well, I can still aggregate the slow query log with mk-log-parser…

