Community journal

The latest from the MySQL community

Ideas, releases, practical guides, and perspectives from the people building with MySQL.

Follow the feed
Showing entries 1 to 10 of 45487 « Previous | Next »
MySQL Online DDL "Duplicate Key" Optimization

When you rebuild a table with MySQL’s Online DDL, the operation can fail partway through with a Duplicate Entry error:

1
2
mysql> alter table tt add c3 int, algorithm=inplace;
ERROR 1062 (23000): Duplicate entry '1' for key 'tt.uk_c2'

This is a long-standing, well-known problem — it has existed ever since Online DDL was introduced in MySQL 5.6, and it appears across several bug reports:

  • BUG#76895 — Adding new column OR Drop column causes duplicate PK error
  • BUG#77572 — The bogus duplicate key error in online ddl with incorrect key name
  • BUG#98600 — Optimize table fails with duplicate entry on UNIQUE …
[Read more]
Thread Pool in Percona Server and MySQL (Part 2)

Thread Pool in Percona Server and MySQL (Part 2)

The previous Part 1 focused on explaining the idea of thread pool, configuration options and analysis of thread pool efficiency in Percona Server for MySQL 9.7.1-1 against the base line, which is the same server without thread pooling.

We recommend reading the post with Part 1 before proceeding with reading Part 2 in the current post.

MySQL 26.7.0 with and without thread pool:

For better understanding of Percona Server 9.7.1-1 and MySQL 26.7.0 / 9.7.2 thread pool performance against each other we will start with a brief look at MySQL on its own.

The test runs did not find any significant differences in the performance of the thread pool between …

[Read more]
FOSS 2026 conference in Chernihiv: how it went

On October 1-2, Chernihiv Polytechnic National University held the II International scientific and practical conference “Free/Open Source Software in Education, Science & Business”. The conference was online and free for everyone. The idea is to bring together people from universities, from industry and from open source communities and talk about how free software is used in education, science and business.

This year Percona was well represented. There were six speakers from Percona, and two more keynote speakers also worked at Percona in the past.

Day 1: keynotes

The first day started with welcome words from Volodymyr Bazylevych, Chair of the Organizing Committee, and Anatolii Prystupa, Vice-Rector for Research. After that there were five keynote talks.

Yevhen Patlan (Percona) spoke about embedding DuckDB …

[Read more]
Meet MySQL 26.7: A New Versioning Era Begins

Over the period, we have witnessed how MySQL versioning evolved from 8.0 to 9.7 LTS, and now it has entered a new era: a calendar-based model.

Let’s first take a brief look at how MySQL versioning has evolved over time.

  • Phase 1 – MySQL 8.0 (2018–2026) used a traditional single-track release model, with all new features and bug fixes rolled into the same 8.0 release line.
  • Phase 2 – Oracle launches an Innovative/LTS dual-track model (Mid 2023). Innovation releases focus on new features and changes to short-lived performance on a quarterly basis. The LTS (Long Term Stable) release is steadier and has a long lifespan, with a cycle of 5 years of Premier Support + 3 years of Extended Support, and it typically launches every 2 years.
  • Phase 3 – There are chains of Innovation releases following (8.1, …
[Read more]
Docker DBA Lab

Building a Database DBA Lab with Docker, PostgreSQL, MySQL, and Percona Monitoring and Management

How I built a local database playground, learned a few lessons the hard way, and created a practical command reference along the way.

Introduction

One of the best ways to learn database administration is to get your hands dirty.

Documentation is important, but there’s something different about building your own environment, breaking it, troubleshooting it, and eventually understanding why everything works.

Recently, I decided to create a local database lab using Docker Desktop on my Mac. My goal was straightforward: build an environment where I could experiment with MySQL, PostgreSQL, Percona XtraDB Cluster (PXC), and Percona Monitoring and Management (PMM), without worrying about disrupting a production environment.

What started as a few containers quickly became a much more …

[Read more]
SecureBridge 12.1, EntityDAC 4.1, and dbExpress drivers: Support for RAD Studio 13 Florence Release 2, SQL Server 2025, and MySQL 9.7

New versions of SecureBridge, EntityDAC, and dbExpress drivers are out. All three now work with RAD Studio 13 Florence Release 2 and offer improved support for the Arm64EC target platform. The dbExpress drivers also add support for Microsoft SQL Server 2025 and MySQL 9.7, while SecureBridge gains SFTP upload resume, multipart/form-data support, and a new SSL/TLS demo.

The post SecureBridge 12.1, EntityDAC 4.1, and dbExpress drivers: Support for RAD Studio 13 Florence Release 2, SQL Server 2025, and MySQL 9.7 appeared first on Devart Blog.

PGO or not PGO this is the dilemma. Step 3

Step 3: Why my sysbench-trained build loses and how to do it right.

Given the topic complexity and the length of this article I have split it in 3 three different blog-post:

  1. What is PGO
  2. How PGO it works
  3. Why my sysbench-trained build loses and how to do it right.

Three compounding reasons:

  1. Uncovered code gets pessimized.
    Sysbench-tpcc touches a narrow slice of mysqld.
    Every function with zero counts is treated as cold: GCC optimizes it for size, skips inlining, and shoves it into cold sections.
    But at runtime I still execute plenty of code my training never touched, such as purge, flushing, stats …
[Read more]
PGO or not PGO this is the dilemma. Step 2

Step 2: How it works

Given the topic complexity and the length of this article I have split it in 3 three different blog-post:

  1. What is PGO
  2. How PGO it works
  3. Why my sysbench-trained build loses and how to do it right.

How PGO works: PGO is a two-pass build. First pass compiles with instrumentation (-fprofile-generate): every basic block and branch gets a counter.
You run a training workload, counters are dumped to profraw files.
Second pass recompiles using those counts to drive inlining decisions, branch layout (hot path falls through, cold path jumps away), hot/cold function splitting, code ordering for icache/iTLB locality, …

[Read more]
PGO or not PGO this is the dilemma. Step 1

Given the topic complexity and the length of this article I have split it in 3 three different blog-post:

  1. What is PGO
  2. How PGO it works
  3. Why my sysbench-trained build loses and how to do it right.

Step 1: What is PGO

PGO (Profile-Guided Optimization) is a two-pass compilation technique. 

First, we build the program with instrumentation that adds counters to every branch, loop, and call site.
Next, we run it against a representative training workload so these counters can record which code paths are actually hot versus cold.
We then recompile the program using that data to drive the compiler’s decisions.

With this profiling …

[Read more]
Step by Step: ProxySQL HA with BGP ECMP Anycast

In our previous blog post ProxySQL HA with BGP ECMP Anycast, we established why we would want to use BGP ECMP as a strategy for making our ProxySQL cluster highly available. Now let’s look at how to implement it technically.

For this scenario we assume that we have:

  • an OPNsense instance as our BGP Router with the IP address 10.5.8.251
  • Two ProxySQL nodes (proxysql-01 with IP 10.5.20.4 and proxysql-02 with IP 10.5.20.5)
  • 10.5.200.1 as the anycast IP we want both ProxySQL nodes to accept connections on

Setup on the router Enable BGP on OPNsense

The out-of-the-box installation of OPNsense does not come with BGP support. To add it, install the FRRouting package first (os-frr), which will enable …

[Read more]
« Previous | Next »