May 26, 2012

Post: Troubleshooting MySQL Memory Usage

… events ? If you can’t get fancy graph quickly you can use… as you can query temporary tables too: mysql> select sum(data_length+index…+ 2623331) File system 294352 (82672 + 211680) Lock system 318875832 (318747272 + 128560) Recovery system 0 … leaks like valgrind are too slow to run in production. So …

Post: MySQL Slow query log in the table

As of MySQL 5.1 get MySQL slow query log logged in mysql.slow_log table instead of the file as you had in… and lock time does not store fractions of the second. Today I’ve got some time to play with table based slow query… end. If you want to get new queries in the end you can do SELECT * FROM (SELECT * FROM slow_log ORDER BY start_time DESC…

Post: Slow Query Log analyzes tools

get rid of really slow queries but to really optimize application throughput queries which generate most of the load need to be investigated Patching Slow Queryslow query log starts to look like this: # User@Host: root[root] @ localhost [] # Query_time: 0.000652 Lock

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

… this in the slow query log: # Time: 111229 3:02:26 # User@Host: msandbox[msandbox] @ localhost [] # Query_time: 2.365434 Lock_time: 0.000000… query, probably selecting only the needed columns which could exclude the blob ones. Conclusion The only conclusion, I can make out is “Get

Post: Performance impact of complex queries

query ripping disk apart, in fact however a lot of queries can get piled up because of reduced cache efficiency many queries… single full table scan query to slow things that bad, so… not suffer from table locks reporting queries can affect web site… it to the master (selects often contribute most of …

Post: Scaling problems still exist in MySQL 5.5 and Percona Server 5.5

… by aggregating query log with mk-query-digest. When I filtered out only queries of…lock_s_lock_spin,pfs_rw_lock_s_lock_fu nc,btr_search_build_page_hash_index,btr_search_info_update_slow…_RANGE_SELECT::get _next,rr_quick,sub_select,do_select,JOIN::exec,mysql_select,handle_select,execute_sqlcom_select,…

Post: How Percona does a MySQL Performance Audit

…-external-locking –port…slow /path/to/slow.log By default, this outputs the top 10 most expensive queries, in total execution time. By the way, the slow queryget from it. Queries are not…query, I run EXPLAIN if possible (rewriting non-SELECT queries if needed, and using careful judgment for queries

Post: Profiling MySQL stored routines

queries in the slow query log generated by our mysql build running with long_query_time=0, getquery SELECT whatstheweatherlike(5); Not overly useful for query optimization, is it? Well, I can still aggregate the slow query…stats, for example if it was slow because of locks, in the logs you may not…

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

… the same as for its predecessor – to get more information about query execution logged into slow log, however the new version is loaded… # InnoDB_rec_lock_wait: 0.000000 InnoDB_queue_wait: 0.067538 # InnoDB_pages_distinct: 20 SET timestamp=1193841780; SELECT DISTINCT c from…: No Merge_passes: 0 # No InnoDB statistics available for this query SELECT COUNT(1) FROM t2; Important note: Although the patch was…

Comment: Database problems in MySQL/PHP Applications

… > methods and get debugging and profiling tools…query(ā€œSelect email from user where name=%sā€,$name) – > wrapper will detect query… do internal full table > lock if auto_…queries, especially > if you see them in slow query log. If you have trouble understanding > EXPLAIN or optimizing your queries