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 11 to 20 of 410 « Previous | Next »
Displaying posts with tag: Percona (reset)
MySQL 8.0 JSON Functions: Practical Examples and Indexing

This post covers a hands-on walkthrough of MySQL 8.0's JSON functions. JSON support has been in MySQL since 5.7, but 8.0 added a meaningful set of improvements — better indexing strategies, new functions, and multi-valued indexes — that make working with JSON data considerably more practical. The following documents several of the most commonly needed patterns, including EXPLAIN output and performance observations worth knowing about.

This isn't a "JSON vs. relational" debate post. If you're storing JSON in MySQL, you probably already have your reasons. The goal here is to make sure you're using the available tooling effectively.

Environment

mysql> SELECT @@version, @@version_comment\G
*************************** 1. row ***************************
        @@version: 8.0.36
@@version_comment: MySQL Community Server - GPL

Testing was done on a VM with 8GB RAM and …

[Read more]
Tuning MySQL for Performance: The Variables That Actually Matter

There is a special kind of boredom that only database people know. The kind where you stare at a server humming along and think, surely there is something here I can tune. Good news: there is.

This post walks through the most important MySQL variables to tune for performance, why they matter, and when touching them helps versus when it quietly makes things worse. This is written with InnoDB-first workloads in mind, because let’s be honest, that’s almost everyone.

1. innodb_buffer_pool_size Real metrics to watch

Before touching this variable, look at these:

sql Copy Copied!

SHOW GLOBAL STATUS LIKE 'Innodb_buffer_pool_read%';

Key fields:

  • Innodb_buffer_pool_reads – physical reads from disk
  • Innodb_buffer_pool_read_requests – logical reads

[Read more]
Configuring the Component Keyring in Percona Server and PXC 8.4

Configuring the Component Keyring in Percona Server and PXC 8.4

(Or: how to make MySQL encryption boring, which is the goal)

Encryption is one of those things everyone agrees is important, right up until MySQL refuses to start and you’re staring at a JSON file wondering which brace ruined your evening.

With MySQL 8.4, encryption has firmly moved into the component world, and if you’re running Percona Server 8.4 or Percona XtraDB Cluster (PXC) 8.4, the supported path forward is the component_keyring_file component.

The good news: the setup is mostly identical for Percona Server and PXC.
The bad news: PXC 8.4.4 and 8.4.5 shipped with a bug that makes this less fun than it should be.

Let’s walk through a setup that works, keeps your keys locked down, and avoids the usual landmines.

Step 1: Tell …

[Read more]
What is New in Percona Toolkit 3.7.1

Percona Toolkit 3.7.1 has been released on Dec 17, 2025. The most important updates in this version are:

  • Finalized SSL/TLS support for MySQL
  • Added support for Debian 13 and Amazon Linux 2023
  • Fixed MariaDB support broken in version 3.7.0
  • Added options to skip certain collections in pt-k8s-debug-collector and pt-stalk
  • Documentation improvements
  • Other performance improvements

In this blog, I will outline the most significant changes. A full list of improvements and bug fixes can be found in the release notes.

SSL/TLS support for MySQL

Percona Toolkit historically did not have consistent SSL support. This was reported at …

[Read more]
MySQL Replication Best Practices: How to Keep Your Replicas Sane (and Your Nights Quiet)

MySQL replication has been around forever, and yet… people still manage to set it up in ways that break at the worst possible moment. Even in 2025, you can get burned by tiny schema differences, missing primary keys, or one forgotten config flag. I’ve seen replicas drift so far out of sync they might as well live in a different universe.

This guide covers the practical best practices—the stuff real DBAs use every day to keep replication stable, predictable, and boring. (Boring is a compliment in database land.)

Always Use GTIDs. Yes, Always.

GTID-based replication is one of those features that people resist turning on, and then once they do, they never want to go back.

Why GTIDs?

  • Failover become sane
  • Reparenting replicas stops being a headache
  • Missing transactions are easy to detect

Your my.cnf should absolutely include:

Copy Copied!

[Read more]
The Right Tool for the Job

When I first got into woodworking, my mentor shared a piece of advice that has stuck with me ever since: “Use the right tool for the job.” You wouldn’t reach for a belt sander to flatten a board when a planer can accomplish the task faster, cleaner, and with far better results.

The same principle applies in the world of database engineering. When working with MySQL or Percona Server, choosing the correct tool can be the difference between efficient diagnostics and unnecessary downtime.

In this post, I’ll highlight several of the most practical and commonly used utilities from the Percona Toolkit. While the toolkit includes many powerful commands, I’ll focus on the ones that provide the most value in day-to-day operations, troubleshooting, and gathering actionable details for support cases.

PT Summary

A Percona Toolkit utility that provides a concise, high-level overview of a system’s hardware, OS …

[Read more]
MySQL Memory Usage: A Guide to Optimization

Struggling with MySQL memory spikes? Knowing how and where memory is allocated can make all the difference in maintaining a fast, reliable database. From global buffers to session-specific allocations, understanding the details of MySQL’s memory management can help you optimize performance and avoid slowdowns. Let’s explore the core elements of MySQL memory usage with best practices for trimming excess in demanding environments.

How MySQL Uses Memory

MySQL dynamically manages memory across several areas to process queries, handle connections, and optimize performance. The two primary areas of memory usage include:

Global Buffers

These are shared by the entire MySQL server and include components like the InnoDB buffer pool, key buffer, and query cache. The InnoDB buffer pool is particularly memory-intensive, especially in data-heavy applications, as it stores frequently accessed data and indexes to speed up …

[Read more]
MySQL 8.4 Support in Percona Toolkit 3.7.0

Percona Toolkit 3.7.0 has been released on Dec 23, 2024. The main feature of this release is MySQL 8.4 support.

In this blog, I will explain what has been changed. A full list of improvements and bug fixes can be found in the release notes.

TLDR;

  • Replication statements in 8.4 are fully supported by the Percona Toolkit
  • pt-slave-delay has been deprecated.
  • pt-slave-find has been renamed to pt-replica-find. The old name has been deprecated but exists in the repository as an alias of the pt-replica-find.
  • pt-slave-restart has been renamed to pt-replica-restart. Old name has been deprecated but exists in the repository as an alias of the …
[Read more]
BELGIAN MYSQL, MARIADB and friends COMMUNITY DINNER – FRIDAY 31 January 2025

FOSDEM is back in town! And the MySQL Devroom is back after one year of absence on the main event. Same as the last few year the MySQL community team is once again organizing the Belgian MySQL Days. This provides us with the opportunity to bring the community together to socialize and exchange idea’s over a Belgian beer or a glass of wine.

So, following a great tradition of dining and drinking together in style with members from all over the community, we have rented a by now familiar private space at ICAB, more detailed directions below.

Book your tickets now!!!

The listed ticket price …

[Read more]
Jemalloc install & config for MySQL

So, we’ve heard that jemalloc is better than malloc for MySQL usage, and in fact, certain versions / forks of mysql already include this, eg. Percona Server (https://github.com/percona/jemalloc).

But, how can I install and configure my system to use it?

Here’s a quick push in the, hopefully, right direction.

First things first, what is “jemalloc” and how does it affect my system? I think it’s quite well explained here: https://www.percona.com/blog/impact-of-memory-allocators-on-mysql-performance/ albeit an old article.

The right place to get the latest …

[Read more]