June 19, 2013

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

… s4 are also lagging behind). s2> select count(*) from t; +———-+ | count(*) | +———-+ | 2 | +———-+ # s1 is behind s1> select count(*) from t; +———-+ | count(*) | +———-+ | 0 | +———-+ Can we…; mysql> change master to master_port=10002; mysql> start slave; # And then check the number of records from the t table s1> select count(*) from

Post: Migrating between MySQL schemas with Percona Xtrabackup

… two scripts: mysql -N -B <<'EOF' > discard-ddl.sql SELECT CONCAT(‘ALTER TABLE `’, table_name, ‘` DISCARD TABLESPACE;’) AS _ddl FROM INFORMATION_SCHEMA.TABLES…=’InnoDB’; EOF mysql -N -B <<'EOF' > import-ddl.sql SELECT CONCAT(‘ALTER TABLE `’, table_name, ‘` IMPORT TABLESPACE;’) AS _ddl FROM INFORMATION_SCHEMA.TABLES…

Comment: Derived Tables and Views Performance

… KEY (`id`)) —————————————————————————————————— $mysql=mysql_connect(’127.0.0.1′,’root’,”); mysql_select_db(‘test’,$mysql); function display_menu($parent, $level) { $result = mysql_query(“SELECT a.id, a.label, a.link, Deriv1.Count FROM `menu…

Post: MySQL Query Patterns, Optimized - Webinar questions followup

On Friday I gave a presentation on “MySQL Query Patterns, Optimized” for Percona MySQL Webinars.  If you missed it, you can still… form. Q: Doesn’t the primary key solution for random selection only work when the IDs for movies are distributed uniformly… the Percona Live MySQL Conference and Expo in Santa Clara, California starting March 31, 2014. Watch more webinars from Percona in the…

Post: Choosing a MySQL HA Solution - MySQL Webinar: June 5

Selecting the most appropriate solution for a MySQL HA infrastructure is as much a business and philosophical decision … webinar entitled, Choosing a MySQL HA Solution, in which we’ll explore the topic of MySQL HA from each of these perspectives.  The… (largely grouped into those which use traditional MySQL replication, those which use some other MySQL-level replication, and those which replicate at…

Comment: INSERT INTO ... SELECT Performance with Innodb tables.

… related output from show engine innodb status: —TRANSACTION BB0E42A, ACTIVE 3 sec fetching rows, thread declared inside InnoDB 334 mysql tables in…) MySQL thread id 38, OS thread handle 0x2b3c1c776940, query id 16838101 localhost root Copying to tmp table create table t as SELECT ld.label_id, cai.inventory_id, COUNT(1) as installed_count from client_app_inventory cai…

Comment: Replication in MySQL 5.6: GTIDs benefits and limitations - Part 1

It may not be easy to simply switch from regular MySQL replication to using replication using GTIDs 1. Temporary tables – CREATE … is not consistent on master/slave db. 3. CREATE TABLE …. SELECT – It is not supported to perform such type of statements…

Comment: Experiences with the McAfee MySQL Audit Plugin

Can different filters be combined? For example, all the select queries in mysql.user from a particular user.

Post: 10 years of MySQL User Conferences

… technical content selected by an independent committee. The conference is refocused back on MySQL and the needs of the MySQL community covering other… of Oracle’s MySQL engineering team, along with some technical talks directly from the Oracle MySQL engineers who brought us MySQL 5.6. MariaDB…

Post: How to recover table structure from InnoDB dictionary

… need the table id to find indexes of the table. mysql> select * from SYS_TABLES WHERE NAME=’sakila/actor’; +————–+—–+——–+——+——–+———+————–+——-+ | NAME | ID | N_COLS… will have minimal `ID` among the indexes of the table. mysql> select * from SYS_INDEXES WHERE TABLE_ID=741; +———-+——+———————+———-+——+——-+———+ | TABLE_ID | ID | NAME…