TL;DR: unless you know what you are doing, you should always have a primary key on your tables when replicating in RBR (and maybe even all the time).
TL;DR2: MariaDB 10.1 has an interesting way to protect against missing a primary key (innodb_force_primary_key) but it could be improved.
A few weeks ago, I was called off hours because replication delay on all the slaves from a replication chain was high and growing. It was not the first time this happened on that chain, so I thought right away that this was probably an UPDATE or DELETE of many rows on a table without a primary key. Let's see what is the problem with this and to understand that, we have to talk about binary log formats.
Wednesday, August 16, 2017
Monday, August 14, 2017
More Details about InnoDB Compression Levels (innodb_compression_level)
In one of my previous posts, I shared InnoDB table compression statistics for a read-only dataset using the default value of innodb_compression_level (6). In it, I claimed, without giving much detail, that using the maximum value for the compression level (9) would not make a big difference. In this post, I will share more details about this claim.
TL;DR: tuning innodb_compression_level is not very useful for my dataset.
TL;DR: tuning innodb_compression_level is not very useful for my dataset.
Thursday, August 10, 2017
Why we still need MyISAM (for read-only tables)
TL;DR: we still need MyISAM and myisampack because it uses less space on disk (half of compressed InnoDB) !
In the previous post, I shared my experience with InnoDB table compression on a read-only dataset. In it, I claimed, without giving much detail, that using MyISAM and myisampack would result is a more compact storage on disk. In this post, I will share more details about this claim.
Monday, August 7, 2017
An Adventure in InnoDB Table Compression (for read-only tables)
In my last post about big MySQL deployments, I am quickly mentioning that InnoDB compression is allowing dividing disk usage by about 4.3 on a 200+ TiB dataset. In this post, I will give more information about this specific use case of InnoDB table compression and I will share some statistics and learnings on this system and subject. Note that I am not covering InnoDB page compression which is a new feature of MySQL 5.7 (also known as hole punching).