Black Friday or Dark Friday? Tips to Ensure Your MySQL Instance Survives Black Friday is one of the most demanding days of the year for e-commerce and online services, and your database is at the heart of it all. A slow or offline MySQL instance can turn your Black Friday into a Dark Friday, costing…
Author: Vinicius Grippa
How to Identify Processes Using Swap Memory on Linux
Identifying which processes have pages swapped out of memory when troubleshooting performance issues on a Linux system is often helpful. Swapping can impact system performance, so knowing which processes are affected is important in diagnosing and resolving these issues. Checking Swap Usage by Process Linux provides detailed process information in the /proc directory. By leveraging…
Testing Dolphie For the First Time: Features and Feedback
In this blog post, I will test Dolphie, an open-source project by Charles Thompson. Dolphie is an open-source tool that provides real-time analytics for MySQL, MariaDB, and ProxySQL. As a first-time user, my goal is to go from zero to hero, exploring how easy it is to start using the tool while getting familiar with…
Understanding MySQL DDL Space Requirements
This blog post will explore MySQL’s file storage behavior during DDL operations, particularly with InnoDB tables. Using a practical example, we’ll discuss where and how MySQL stores data during different types of DDL operations. Setting the Stage: Table Structure Consider a table sbtest1 with 30 million rows, created as follows:
1 2 3 4 5 6 7 8 |
CREATE TABLE `sbtest1` ( `id` int NOT NULL AUTO_INCREMENT, `k` int NOT NULL DEFAULT '0', `c` char(120) NOT NULL DEFAULT '', `pad` char(60) NOT NULL DEFAULT '', PRIMARY KEY (`id`), KEY `k_1` (`k`) ) ENGINE=InnoDB AUTO_INCREMENT=30000001 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; |
This table is actively used…
Understanding Latency Through a 100m Race: From CPU to NVMe
In the world of computing, latency is everything. Whether you’re optimizing a database query or fine-tuning a high-performance application, understanding how quickly different components of your system respond can make or break performance. But let’s put these abstract nanoseconds and microseconds into a more relatable scenario—a 100m sprint race. 🏃♂️🏃♀️ The Runners in the Race…
How to Add an Invisible Primary Key to an Existing Table in MySQL
With MySQL 8.0.23, the concept of invisible columns was introduced. Columns marked as invisible do not appear in standard SELECT * queries and don’t require changes to existing application code. Later, in MySQL 8.0.30, support for automatically generated invisible primary keys (GIPKs) was added for InnoDB tables created without an explicit primary key. This enhancement, controlled by…
How to Monitor and Optimize Fragmented Tables in MySQL
Random insertions or deletions in a secondary index can lead to fragmentation, where the physical order of index pages on disk no longer aligns with the logical order of records. A common sign of fragmentation is that a table occupies more space than expected, though determining the exact amount is challenging. InnoDB stores data and…
MySQL Brazil Meetup 2024 – Informações do Evento e Agenda
Salve a todos os nerds! O nosso meetup de MySQL de 2024 já tem uma data! Data: 05 de Outubro, Sábado, 2024 Horário: 9:00 AM – 5:30 PM (Horário de Brasilia) Local: Oracle do Brasil Sistemas, Rua Dr. José Áureo Bustamante 455, bl. 110, São Paulo, SP, BR, 04710-090 Teremos um dia inteiro com palestras…
How to Sort MySQL Tables by Size and Why It Matters
Introduction Efficient database management ensures optimal performance, especially as your data grows. One important aspect of managing a MySQL database is monitoring and managing the size of your tables. Knowing which tables are the largest can help optimize queries, plan storage, and identify potential performance bottlenecks. Why Table Size Matters 1. Performance Optimization: Large tables…
How to Run ANALYZE in MySQL
Introduction In database management, keeping your database running smoothly is essential. ANALYZE is a command in MySQL that helps update statistics for table indexes. These statistics help the query optimizer choose the most efficient way to execute queries. How to Use the ANALYZE Command Here’s how you can use the ANALYZE command to improve your database’s…