June 19, 2013

Post: Identifying the load with the help of pt-query-digest and Percona Server

… are available for queries that are logged using the general query log. Installing pt-query-digest tool (as well as other tools from Percona Toolkit… pt-query-digest Using pt-query-digest is pretty straight forward: pt-query-digest /path/to/slow-query.log Note that executing pt-query-digest can…

Post: Get Me Some Query Logs!

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

Post: Logging MySQL queries from the client instead of the server

The “slow query log” is the single most valuable way to examine query execution on your MySQL server. Queries are logged with timing information… time the queries and write a query log. I suggest writing out something in a standard logging format such as the slow-query-log format, so you can analyze it easily with tools such as Maatkit’s mk-query-digest. These tools can do…

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

I don’t use many tools in my consulting practice but for the ones I do, … – I had a slow query log (captured with long_query_time=0 and all the eXtra benefits from Percona slow query log patch), I knew… a slow query log that lists all the queries that were executed during this session in the order they were executed: mk-query-digest…

Page: Tools

tool to analyze slow query log. It reads bunch of different log formats and has various stats, and it was there before pt-query-digest appeared. innotop Innotop is great top like tool for MySQL and is helpful even… your tablespace or table on the file level ? iostat iostat tool is a great help investigating/troubleshooting IO problems – it will…

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

query. This includes the general log, the binary log and the slow query log. Maatkit includes tools which interact with these logs, including mk-query-digest. This tool, in particular, has a…

Post: Replaying database load with Percona Playback

tool that can replay the data captured from the production server in another different server. It can replay queries from tcpdump or slow query logs. With this tool you can measure how a database upgrade… 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…

Post: Find unused indexes

… another approach. Percona Toolkit has a tool to check the usage of our 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… plan. pt-index-usage tries to convert non-SELECT queries to SELECT queries and is not always possible to get a perfect…

Post: How To Test Your Upgrades - pt-upgrade

…-upgrade This tool lets you test your SELECT queries against multiple MySQL servers and reports on how each type of query performs from…. 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… 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…

Post: Percona Server with XtraDB Case Study, Behind the Scenes

… of slow queries I found was caused by different things. Sometimes GDB stack traces showed InnoDB mutex contention, sometimes oprofile showed the query… ad-hoc slow-query-log analysis with awk and other tools to discover and investigate unusual patterns, and figure out whether queries were causes…