June 18, 2013

Post: Get Me Some Query Logs!

… long_query_time=0 Setting slow_query_log_file=mysql-slow.log-full-20121122112413 Setting slow_query_log=1 Flushing slow query log Sleeping 5 seconds… done. Restoring slow_query_log_file=mysql-slow.log Restoring long_query

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

… is 0.3s! # Query_time: 0.503016 Lock_time: 0.000048 Rows_sent: 56 Rows_examined: 1113 LOGGING OF THE REPLICATED STATEMENTS Normally MySQL will not write into slow log any queries executed… the time (in seconds) query had to wait on row locks. InnoDB_queue_wait is the time (in seconds) query spent either waiting to…

Post: Replaying database load with Percona Playback

… 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… slow query log to the DEV server we can replay the load: percona-playback –mysql-host=127.0.0.1 –mysql-user=root –mysql-schema=my_db –query… it needed 59 seconds to execute the load but it was 47 seconds originally on the production server. 98966 queries were faster and…

Post: Is your server's performance about to degrade?

… in the slow query log, and extended statistics in the same log. I logged a couple gigabytes of queries at 0-second threshold (all queries) and… the slow query log: there are just places where the log is full of these queries all taking 0.24 seconds, or all taking 0.30 seconds… done about it — and that’s where improvements to the MySQL source code are necessary. But in many cases something can…

Post: How to use tcpdump on very busy hosts

… mk-query-digest output was obviously bogus when compared to the host’s slow-query-log (for example, none of the top 5 slow queries reported by mkqd appeared in the actual slow log file… — if your long-query-time is 1 second, and mkqd believes that a query which actually took 10ms instead took 0.9s, the results…

Post: Optimizing slow web pages with mk-query-digest

slow query log (captured with long_query_time=0 and all the eXtra benefits from Percona slow query

Comment: Slow Query Log analyzes tools

… least 3 seconds, remove duplicates and save result to file php mysql_filter_slow_log.php -T=3 -eu=root –no-duplicates mysql-slow-queries.log # Start permanent filtering of all slow queries from now on: at least 3 seconds or examining 10000 rows, exclude users root and test tail -f -n 0 linux-slow

Post: mk-query-digest, query comments and the query cache

MySQL log files as part of the query. This includes the general log, the binary log and the slow querysecond match expression:([^ ]+)captures everything up to the first space. A problem with this approach is that MySQL treats identical queries

Post: Poor man's query logging

… –log-slow-queries parameter (MySQL 5.1 requires also –slow-query-log), which was designed to store poorly performing queries that run at least 2 seconds. Percona… communicate with MySQL through TCP sockets. When localhost (not to be confused with 127.0.0.1) is used as a MySQL host, this…

Comment: Get Me Some Query 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… values for query execution time, and stores them as an integer. So all your quick queries will show up as taking 0 seconds. The conclusion is that RDS is very convenient as a MySQL appliance, but…