June 20, 2013

Post: MySQL Query Patterns, Optimized - Webinar questions followup

… gave a presentation on “MySQL Query Patterns, Optimized” for Percona MySQL Webinars.  If you missed it, …: Doesn’t the primary key solution for random selection only work when the IDs for movies are…poor performance, but it returns a better random choice. Another workaround may be to add a column to…

Post: Replication in MySQL 5.6: GTIDs benefits and limitations - Part 2

… scenario can happen when you want to perform a planned failover. With GTIDs, all the…mysql> change master to master_port=10002; mysql> start slave; # And then check the number of records from the t table s1> select…b986-0800272864ba:4 ? A ‘Last_Executed_GTID’ column would have been useful. In our …

Post: Percona XtraDB Cluster 5.5.30-23.7.4 for MySQL now available

…Benchmark showing the impact of memory allocators on MySQL performance can be found in this blogpost. This …would fail in case mixed CHAR and VARCHAR columns would be used in foreign key definitions. Bug…(Raghavendra D Prabhu). In case CREATE TABLE AS SELECT statement was running in parallel with the …

Post: Eventual Consistency in MySQL

…that the enforcement of foreign keys incurs a significant performance overhead.1,2 MySQL allows us to set FOREIGN_KEY_CHECKS=…relationship: mysql> SELECT CONCAT( ‘SELECT ‘, GROUP_CONCAT(DISTINCT CONCAT(K.CONSTRAINT_NAME, ‘.’, P.COLUMN_NAME, ‘ AS `’, P.TABLE_SCHEMA, ‘.’, P.TABLE_NAME, ‘.’, P.COLUMN_…

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

… useful, simply ignore this column. It is used to prevent wide innodb primary keys on the MV. mysql> select mview$pk as rank… than COUNT(*). mysql> select count(*) cnt from order_lines\G *************************** 1. row *************************** cnt: 155187034 1 row in set (32.03 sec) mysql> select sum(total….03 sec) Notice the difference in response time. Refresh method performance comparison For demonstration purposes, I did the following: Created one…

Post: Wow. My 6 year old MySQL Bug is finally fixed in MySQL 5.6

…you perform match of constant which is too large to the column instead of simply responding with empty set MySQL truncates the constant, performs… for unsigned column and I would expect “Impossible Where clause” here Lets look at query execution: | Handler_read_next | 1305742982 | mysql> select count…

Post: MySQL 5.6.10 Optimizer Limitations: Index Condition Pushdown

… same “SELECT one_indexed_column” query in MySQL 5.6.10. This turned into a really nice exercise for checking the performance and inner… the following query in particular that had this surprising outcome: mysql> SELECT * FROM cast_info WHERE role_id = 1 and note like… (just one column) and can take advantage of the covering index technique, did actually take more time to execute: mysql> SELECT role_id…

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

…: SELECT non_key_column FROM tbl WHERE key_column=x This query will roughly be evaluated in following steps, without MRR: SELECT key_column, pk_column… were captured when performing the benchmark on IO bound workload, mentioned above. Counter Name MySQL 5.5 MySQL 5.6 MySQL 5.6 w…

Post: MySQL Indexing Best Practices: Webinar Questions Followup

… indexing to be on that column. That would clearly save indexing space. Is this a reasonable performance optimization. (Keep in mind that… SELECT * FROM TBL WHERE hash=crc32(‘string’) AND string=’string’ The other thing you need to consider is string comparison in MySQL… worry about performance impact of extending index is when you increase its length dramatically, for example adding long varchar column. In such…

Post: InnoDB Full-text Search in MySQL 5.6 (part 1)

… how using an explicitly-defined column is done is this one, which discusses improving bulk insert performance. At the very bottom, the… what happens: mysql> set global innodb_ft_aux_table=’test/dir_test_innodb’; mysql> set global innodb_optimize_fulltext_only=1; mysql> select * from…