June 19, 2013

Post: MySQL Query Patterns, Optimized - Webinar questions followup

…subsequent queries against the temp table fail. Q: Why doesn’t the query optimizer take care the execution decisions…primary key, the result was a query that took half the time. An important conclusion of my … my webinar!  Here are some more tips: Check out upcoming Percona Training classes in North …

Post: The small improvements of MySQL 5.6: Duplicate Index Detection

…on my last webinar, but did not have time to analyze it in-depth.  If you try…s see an example. If we execute: mysql> ALTER TABLE test ADD INDEX (col2); Query OK, 0 rows affected …, depending on the query optimizer and the MySQL version, we always recommend to check manually the optimizations proposed…

Post: More on MySQL transaction descriptors optimization

…: single SELECT queries doing PRIMARY KEY lookups (aka QPS sysbench mode); same MySQL queries executed inside single-… (about 23GB). So it makes sense to check if the dataset size makes any difference….1 –rand-type=uniform –forced-shutdown=1 –max-time=120 –max-requests=0 –percentile=99 –mysql-…

Post: Checking for a live database connection considered harmful

…. It’s useless to check and then execute. Instead, the code should be rewritten something like this: function query_database(connection, sql, retries… to the application of the network round-trip plus the query execution time, and the added load on the database server. The added… taking over 40% of the server’s total query time. Eliminating the useless connection checks could have nearly halved the load on this…

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

… last time the view was refreshed. The incremental refresh method can be many orders of magnitude faster than the original query execution time. It may be possible, therefore, to refresh an MV based on a query that takes 45 minutes to execute with… can easily check that it parses by running the SELECT portion, adding LIMIT 0 to the SELECT part of the query. convert…

Post: MySQL Slow query log in the table

TIME type which is used to store query execution time and lock time does not store fractions of the second. Today I’ve got some time to play with table based slow query… inserts and run long reporting query on the log file query execution is still proceeds. I have not checked if concurrent insert is always…

Post: Troubleshooting MySQL Upgrade Performance Regressions

… more complicated test which runs this query concurrently many times or even workload consisting of several query types. Though it is rather rare… query is written and provide the hints. Check Query Execution If query execution plan looks the same it is good to check whenever it seems to be executing

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

… long_query_time is in microseconds and you can set it for example to 300000 which is 0.3s! # Query_time: 0.503016 Lock_time… –log-slow-slave-statements. THE DETAILED INFORMATION ABOUT QUERY EXECUTION Each query can be executed in various ways. For example it may use indexes… by a query as there is more chance for hash collisions. In case InnoDB is not used for the query execution that information…

Post: Slow Query Log analyzes tools

… general logs queries before queries are executed (and even parsed) so it can’t contain query execution information such as execution and lock times and number of… of time and then get back to logging only very slow queries. Once you have created full log – parse it and check queries using…

Post: Handling big result sets

query() does. So mysql_query buffers all rows on client side. Let’s try our script with mysql_unbuffered_query instead of mysql_query. execution time