June 19, 2013

Post: Should you name indexes while doing ALTER TABLE ?

…> alter table t1 add key(i); Query OK, 0 rows affected (0.00 sec) Records: 0 Duplicates: 0 Warnings: 0 mysql> alter table t1 add key(i); Query OK, 0 rows affected (0.00 sec) Records: 0 Duplicates: 0 Warnings: 0 mysql> alter table t1… run ALTER TABLE on the SLAVE server to check things out and when run it again on the master to apply changes to all SLAVEs

Post: Managing Slave Lag with MySQL Replication

… to ALTER TABLE, though running it on Master is frequently not an option either. So this query is often run directly on the Slave(s) when master switched to one of them (especially easy with Master-Master setup) and when query repeated… this on Master-Master setup do not forget to disable binary logging with SET SQL_BIN_LOG=0 before you run ALTER TABLE query…

Comment: Filtered MySQL Replication

Gigiduru, No indeed it is as simple as you describe but you need to have extreme care which statements do you filter out. Manually running ALTER TABLE on slave and master separately is actually rather good use.

Post: Ultimate MySQL variable and status reference list

table_namesblogpercona.commanual master_bindblogpercona.commanual master_connect_retryblogpercona.commanual master_hostblogpercona.commanual master_info_fileblogpercona.commanual master_passwordblogpercona.commanual master_portblogpercona.commanual master_retry_countblogpercona.commanual master

Post: Finding your MySQL High-Availability solution – Replication

… run the alter table on a slave and then, once done, we let the slave catch up with the master using the new table schema, we failover to the slave and repeat the alter table on the other server. Those online schema change are easier when a master to master topology is…

Post: Filtered MySQL Replication

Master or on the Slave. Filtering on the Slave is normally preferred as in this case you get full binary log on the Master… add more tables to be replicated to the slaves. Another issue is of course creating and altering tables. If you have Innodb tables you’re normally OK because you can use –skip-innodb on the filtering slave and…

Comment: MySQL Server Memory Usage

alter_db’, ’0′ ‘Com_alter_table‘, ’7′ ‘Com_analyze’, ’0′ ‘Com_backup_table‘, ’0′ ‘Com_begin’, ’0′ ‘Com_change_db’, ’155′ ‘Com_change_master…_range_check’, ’0′ ‘Select_scan’, ’1104831′ ‘Slave_open_temp_tables‘, ’0′ ‘Slave_retried_transactions’, ’0′ ‘Slave_running’, ‘OFF’ ‘Slow_launch_threads’, ’0′…

Post: Using MMM to ALTER huge tables

table to be rebuilt – adding/dropping columns or indexes, changing data type, converting data to different character set – MySQL master-master…this stage. If you’re altering gigabyte size tables, this step may take some …. on db2: start replication mysql> START SLAVE; On step #1 MMM should have …

Post: Quickly finding unused indexes (and estimating their size)

TABLE_SCHEMA, TABLE_NAME, INDEX_NAME from master_index_stats ) UNION DISTINCT (select TABLE_SCHEMA, TABLE_NAME, INDEX_NAME from slave_index_stats) ORDER BY TABLE_SCHEMA, TABLE…_file_per_table, then you can rebuild the tablespace for your table by simply doing: mysql> alter table mytable ENGINE=Innodb…

Post: Percona Toolkit Webinar followup Q&A

… to slaves with the –recursion-method option. Q: In the case of slave behind master, can you explain how to run pt-table-checksum and pt-table-sync from slave? This was replied… data set sizes, it may be faster to run the alter table command directly (specially so when dropping an index, based on…