June 18, 2013

Post: How to debug long-running transactions in MySQL

… for a while, use mk-query-digest to convert this into a query log, and examine the log. In MySQL 5.1 and newer with… feature in mk-query-digest, which prints out a sequence of queries in an easy-to-view format, rather than aggregating the worst queries together. This has worked for me a few times. Alas…

Post: Flexviews - part 3 - improving query performance using materialized views

… the SELECT part of the query. convert.php This script takes as one argument the default database. Notice in the following example, the… first time. Both of these views build in about the same about of time: mysql> call flexviews.enable( -> flexviews.get_id(‘demo’,'complete_example2′)); Query

Post: MySQL Indexing Best Practices: Webinar Questions Followup

… has to be traversed in both directions for different queries. This will use fast primary key for some queries and use key K…` IN (5)” regarding indexes and performance? A: Recent MySQL versions are smart enough to convert id IN (5) to ID=5 (for single item in-lists). There were the times when when…

Post: Multi Range Read (MRR) in MySQL 5.6 and MariaDB 5.5

… lookups to one or more range primary key lookup. Thereby, converting Random access to one or more sequential access. There is… in query time for MySQL 5.6, increase of 0.02s. But the query times for MariaDB 5.5 are greater than both MySQL 5.5 and MySQL…, then query times remain under a minute. So when the correct query execution plan is not used, there is no difference in query times between MySQL 5…

Post: How to convert MySQL's SHOW PROFILES into a real profile

SHOW PROFILES shows how much time MySQL spends in various phases of query execution, but it isn’t a full-featured profile. By …; 997 rows in set (0.18 sec) The query consumed 0.18 seconds. Where did the time go? mysql> SHOW PROFILE FOR QUERY 1; +———————-+———-+ | Status…

Post: InnoDB Full-text Search in MySQL 5.6: Part 2, The Queries!

…text Search in MySQL 5.6: Part 2, The Queries![/caption] This is part 2 in a 3 part series. In part 1…name “James”, and the word “Peterson” is listed in there several times, but “Arizona” is not present at all, …possible to take the MyISAM full-text parser code, convert it to a plugin, and use it for …

Post: MySQL Upgrade Webinar Questions Followup

MySQL Replication to work. You might need to inject MySQL 5.0 in between so it will convertin future MySQL versions also MyISAM tables are essentially at the state they were in MySQLin all cases – sometimes queries just need to be changed or supplemented with hints to get to old execution plans. In

Post: How Percona does a MySQL Performance Audit

… long-running because they’re in Locked status, which might be an indication that it’s time to convert MyISAM tables to InnoDB. (But then again, it might not be.) Or maybe the client is doing queries like… the top 10 most expensive queries, in total execution time. By the way, the slow query logs in the stock MySQL server are extremely limited, and…

Post: MySQL Prepared Statements

in textual protocol, which not only consumed time but also required extra memory consumption both on server and client. So in MySQLtime in this case. It could also reduce performance in certain cases because if you execute query

Post: MySQL Slow query log in the table

MySQL 5.1 get MySQL slow query log logged in mysql.slow_log table instead of the file as you had in… format as TIME type which is used to store query execution time and lock time does not store… convert table to MyISAM, disable concurrent inserts and run long reporting query on the log file query