Tag - Primary

Bypassing SST in Percona XtraDB Cluster with binary logs

In my previous post, I used incremental backups in Percona XtraBackup as a method for rebuilding a Percona XtraDB Cluster (PXC) node without triggering an actual SST. Practically this reproduces the SST steps, but it can be handy if you already had backups available to use.
In this post, I want to present another methodology […]

Read more

Bypassing SST in Percona XtraDB Cluster with incremental backups

Beware the SST
In Percona XtraDB Cluster (PXC) I often run across users who are fearful of SSTs on their clusters. I’ve always maintained that if you can’t cope with a SST, PXC may not be right for you, but that doesn’t change the fact that SSTs with multiple Terabytes of data can be quite […]

Read more

How to obtain the MySQL version from an FRM file

I recently helped a customer figure out why a minor version MySQL upgrade was indicating that some tables needed to be rebuilt. The mysql_upgrade program should be run for every upgrade, no matter how big or small the version difference is, but when only the minor version changes, I would normally not expect it […]

Read more

TOI wsrep_RSU_method in PXC 5.6.24 and up

I noticed that in the latest release of Percona XtraDB Cluster (PXC), the behavior of wsrep_OSU_method changed somewhat.  Prior to this release, the variable was GLOBAL only, meaning to use it you would:

Shell

mysql> set GLOBAL wsrep_OSU_method=’RSU’;
mysql> ALTER TABLE …
mysql> set GLOBAL wsrep_OSU_method=’TOI’;

123

mysql> set GLOBAL wsrep_OSU_method=’RSU’;mysql> ALTER TABLE …mysql> set GLOBAL wsrep_OSU_method=’TOI’;

This had the (possibly […]

Read more

Playing with Percona XtraDB Cluster in Docker

Like any good, thus lazy, engineer I don’t like to start things manually. Creating directories, configuration files, specify paths, ports via command line is too boring. I wrote already how I survive in case when I need to start MySQL server (here). There is also the MySQL Sandbox which can be used for the […]

Read more

Percona XtraDB Cluster (PXC): How many nodes do you need?

A question I often hear when customers want to set up a production PXC cluster is: “How many nodes should we use?”
Three nodes is the most common deployment, but when are more nodes needed? They also ask: “Do we always need to use an even number of nodes?”
This is what we’ll clarify in this […]

Read more

Getting EXPLAIN information from already running queries in MySQL 5.7

When a new version of MySQL is about to be released we read a lot of blog posts about the performance and scalability improvements. That’s good but sometimes we miss some small features that can help us a lot in our day-to-day tasks. One good example is the blog post that Aurimas wrote about […]

Read more

Update on the InnoDB double-write buffer and EXT4 transactions

IMPORTANT: DON’T TRY THIS IN PRODUCTION. As demonstrated by Marko (see comments), it may corrupt your data.
In a post, written a few months ago, I found that using EXT4 transactions with the “data=journal” mount option, improves the write performance significantly, by 55%, without putting data at risk. Many people commented on the post mentioning […]

Read more

Speed up GROUP BY queries with subselects in MySQL

We usually try to avoid subselects because sometimes they force the use of a temporary table and limits the use of indexes. But, when is good to use a subselect?
This example was tested over table a (1310723 rows), b, c and d ( 5 rows each) and with MySQL version 5.5 and 5.6.
Let’s suppose […]

Read more

Percona XtraDB Cluster: Quorum and Availability of the cluster

Percona XtraDB Cluster (PXC) has become a popular option to provide high availability for MySQL servers. However many people are still having a hard time understanding what will happen to the cluster when one or several nodes leave the cluster (gracefully or ungracefully). This is what we will clarify in this post.
Nodes leaving gracefully
Let’s […]

Read more