The usage of MySQL Router as a Middleware/Proxy/Router has increased along with the rise in MySQL InnoDB Cluster usage. While it is still relatively easy to use in production, monitoring it to stay informed about its current status is essential. This blog post will cover how to check and monitor MySQL routers, routes, and other […]
Flow control is not a new term, and we have already heard it a lot of times in Percona XtraDB Cluster/Galera-based environments. In very simple terms, it means the cluster node can’t keep up with the cluster write pace. The write rate is too high, or the nodes are oversaturated. Flow control helps avoid excessive […]
Any Galera documentation about limitations will state that tables must have primary keys. They state that DELETEs are unsupported and other DMLs could have unwanted side-effects such as inconsistent ordering: rows can appear in different order on different nodes in your cluster.If you are not actively relying on row orders, this could seem acceptable. Deletes […]
To be honest, the comparison between the two MySQL distributions is not something that excited me a lot. Mainly because from my MySQL memories, I knew that there is not a real difference between the two distributions when talking about the code base.To my knowledge the differences in the enterprise version are in the additional […]
It is a known good practice to keep only necessary indexes to reduce the write performance and disk space overhead. This simple rule is mentioned briefly in the official MySQL Documentation:https://dev.mysql.com/doc/refman/8.0/en/optimization-indexes.htmlHowever, in some cases, the overhead from adding a new index can be way above the expectations! Recently, I’ve been analyzing a customer case like […]
One of our customers wants to create a table having a column of data type TEXT with the default value, but they encountered an error: [crayon-661430a432b94245573814-i/]. It seems reasonable at first glimpse, as we know that each BLOB, TEXT, GEOMETRY, or JSON value is represented internally by a separately allocated object. This is in contrast […]
Oracle recently made their quarterly releases with MySQL 8.0.35 and MySQL 8.2. This blog post is a quick look at the release notes to see what these new versions bring to the community. You’ll want to keep an eye on the deprecations in particular because some long-accepted behavior, including wildcards, will change eventually.We get 83 […]
Transparent Huge Pages (THP) is a memory management feature in Linux operating systems that aims to enhance system performance. While THP can be beneficial for many applications, enabling it on a database server could have unintended consequences. In this post, we will explore THP, its impact on database servers, and how to disable it for optimal performance and stability.
What are Transparent Huge Pages?
In order to understand THP, we should first start with a brief description of Linux HugePages. The concept of HugePages in Linux has existed for many years, first introduced in 2007. By default, the majority of widely used Linux distributions employ a virtual memory page size of 4KB. However, the inclusion of the HugePages feature allows the Linux kernel to efficiently handle substantial memory pages alongside the standard 4KB size.
In order for an application to utilize HugePages, however, it must explicitly include an …
[Read more]In this article, I want to discuss a couple of pretty new features in MySQL 8.0 — and an older one. Maybe these are minor features you are not aware of, and maybe not so relevant, to be honest. But it is worth providing a quick overview, showing how they work, and how they could be useful in some cases.
All refer to the invisibility of something:
- Invisible columns
- Generated invisible primary keys
- Invisible indexes
Let’s take a look.
Invisible columns
The invisible columns feature has been deployed since version 8.0.23. What is an invisible column? It’s basically a regular column of a table with its own name and data type. It is treated and updated as any other regular column, with the only difference being that it is invisible to the application. In other words, it can be accessed only in the case it is explicitly addressed in your SELECT; otherwise, it is …
[Read more]Dynamic SQL is a desirable feature that allows developers to construct and execute SQL statements dynamically at runtime. While MySQL lacks built-in support for dynamic SQL, this article presents a workaround using prepared statements. We will explore leveraging prepared statements to achieve dynamic query execution, parameterized queries, and dynamic table and column selection.
Understanding prepared statementsMySQL support for server-side prepared statements, leveraging the efficient client/server binary protocol. A prepared statement is a functionality designed to execute identical or similar SQL statements repeatedly, achieving optimal efficiency in database operations.
Advantages of Prepared Statements
- Reduced Parsing Overhead: Prepared statements minimize the overhead of parsing SQL queries each time they are executed. This is especially advantageous in database applications that …