June 19, 2013

Post: Small things are better

… failures. Sometimes corruption kind be mild, so ALTER TABLE to rebuild the table fixes it. Sometimes table needs to be dropped and recovered from… tables allow per table backup and recovery to happen faster. With MySQL and blocking ALTER TABLE there is yet another reason to keep tables small… at 256 groups of tables. Current data size is small enough so even single table would not be big problem but it is…

Post: Find and remove duplicate indexes

…: mysql> alter table t add index(name); mysql> alter table t add index(name); mysql> alter table t add index(name); mysql> show create table t\G [...] KEY…: mysql> alter table t add index key_for_first_name(name); Query OK, 0 rows affected (0.01 sec) mysql> alter table t add… execution plan changes to Using where. There is also a big difference in the number of Handler_read_next requests, so…

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

I’ve never been a very big fan of MyISAM; I would argue that in most situations, … then I create one, the following warning is generated: mysql> alter table dir_test_innodb ADD FULLTEXT KEY (full_name, details); Query… time. If you try it, this is what happens: mysql> alter table dir_test_innodb ADD FULLTEXT KEY (full_name, details), ADD…

Post: High-Performance Click Analysis with MySQL

… huge MyISAM tables and taking downtime, I would not use MyISAM for anything but read-only tables when things get big.  And…, it doesn’t save you from the downtime caused by ALTER TABLE — a typical reason to think about master-master with failover… row-based replication in a way. When you’re updating big aggregate tables, don’t work with giant chunks of them at…

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

table, then you can rebuild the tablespace for your table by simply doing: mysql> alter table

Post: How Percona does a MySQL Performance Audit

… | | Bytes_sent | 216162991863 | 7796961 | | Com_admin_commands | 255868807 | 11893 | | Com_alter_db | 0 | 0 | …snip This output is very useful when…_tmp_tables, I’ll paste in mysql> show global variables like ‘%table_size%’; +———————+———–+ | Variable_name | Value | +———————+———–+ | max_heap_table_size | 268435456 | | tmp_table_size… be fixed and bring big gains. Schema, query, and index optimization Analyzing and optimizing a server’s table and index structures, and…

Post: How to load large files safely into InnoDB with LOAD DATA INFILE

… I recall). When InnoDB loads the file, it creates one big transaction with a lot of undo log entries. This has… a million rows each. (InnoDB internally does operations such as ALTER TABLE in 10k row chunks, by the way; I chose 1M… one big 4.1GB transaction, then I did it 1 million rows at a time. Here’s the CREATE TABLE: CREATE TABLE load…

Post: Filtered MySQL Replication

To get this straight – I’m not a big fan of filtered or partial MySQL Replication (as of version … add more tables to be replicated to the slaves. Another issue is of course creating and altering tables. If you have Innodb tables you… same with MyISAM tables, because MyISAM can’t be disabled and so if you create tables as MYISAM or ALTER them to MyISAM…

Post: Should you move from MyISAM to Innodb ?

…, problems dealing with very large number of tables, slow data load and ALTER TABLE and others. Another big one is COUNT(*) without where clause… is good for MyISAM kills Innodb, such as copying binary tables between the servers. It is important the team understands Innodb… pick one storage engine (typically Innodb) and when use other tables when it really gives substantial gains. I would not switch…

Post: Percona Toolkit 2.1.9 is ready

…Fixed bug 1099665: pt-heartbeat 2.1.8 reports big time drift with UTC_TIMESTAMP The previous … option. * Fixed bug 918056: pt-table-sync false-positive error “Cannot nibble table because MySQL chose no index…primary key is tricky, the tool stops if –alter contains “DROP PRIMARY KEY”, and you have to …