Large tables can pose challenges for many operations when working with a database. Occasionally, we may need to modify the table definition. Since RDS replication does not use asynchronous for its replication, the typical switchover procedure is not feasible. However, the Blue/Green feature of RDS utilizes asynchronous replication, which allows us to update the table […]
What index will be used when you count all rows in a table? Well, the MySQL documentation provides a straightforward answer to this, quoting: InnoDB processes SELECT COUNT(*) statements by traversing the smallest available secondary index unless an index or optimizer hint directs the optimizer to use a different index. If a secondary index is […]
Here is part two of my MySQL with Diagrams series (Here’s part one – MySQL with Diagrams Part One: Replication Architecture). We are going to explore how MySQL handles thread termination using the KILL command, as visualized in the provided diagram, and provide sample demonstrations to help you better understand. Many people think they know […]
At Percona, we’ve always prioritized performance, and recent trends in MySQL’s development have been a point of concern for us. In particular, the performance deterioration in the MySQL 8.4.x and 9.y versions caught our attention, as highlighted in Marco Tusa’s insightful blog post, Sakila, Where Are You Going? We’re pleased to report that the latest […]
This blog post explains the cause of “ERROR 1412 (HY000): Table definition has changed, please retry transaction” with the specific Isolation level settings. Background As per the MySQL documentation, this error should occur for “operations that make a temporary copy of the original table and delete the original table when the temporary copy is built.” […]
In this series, “MySQL with Diagrams,” I’ll use diagrams to explain internals, architectures, and structures as detailed as possible. In basic terms, here’s how replication works: the transactions are written into a binary log on the source side, carried into the replica, and applied. The replica’s connection metadata repository contains information that the replication receiver […]
TL;DR ALTER TABLE and OPTIMIZE TABLE on an InnoDB table, which rebuilds the table without blocking concurrent changes to it (i.e., executed using INPLACE algorithm) and concurrent DML or purge activity on the table can occasionally lead to two significant problems: ALTER/OPTIMIZE TABLE failing with an unnecessary duplicate key error (even though there are no […]
Even though I used a dedicated Kubernetes cluster to host my test database, I had this belief that by not explicitly allocating (or requesting, in Kubernetes vocabulary) CPU resources to my Percona XtraDB Cluster (PXC) pods or yet making just a small request, Kubernetes could be delaying access to the free CPU cycles available on […]
We already have blog posts about Dual Password in MySQL from Brian Sumpter – Using MySQL 8 Dual Passwords, and from Marco Tusa – MySQL Dual Passwords – How To Manage Them Programmatically Let’s skip the details about dual passwords and focus on tracking password usage. How can we be sure that we are using […]
In this blog post, we will explore how network partitions impact group replication and the way it detects and responds to failures. In case you haven’t checked out my previous blog post about group replication recovery strategies, please have a look at them for some insight. Topology: [crayon-679a34649ff01034069338/] Scenario 1: One of the GR nodes […]