This blog discusses recommender system models and their usage in MySQL HeatWave AutoML
A common practice among DBAs and developers is to copy table data and .frm files from the data dictionary. They often set up batch jobs to automate the recovery of these tables. This capability is also utilized in disaster recovery scenarios, where individuals well-versed in .frm files can reconstruct their metadata as needed.
In MySQL 8.0, the information is presented within serialized objects within the dictionary. In the case of InnoDB tablespaces, this information is incorporated into the tablespace itself, creating a fusion of metadata and data primarily to enhance performance. MySQL writes a .sdi file to accommodate the serialized dictionary information for storage engines that lack support for this functionality.
Purpose of .sdi files
Serialized dictionary information (SDI) files store serialized metadata about various database objects, such as tables, indexes, and other schema-related details. This serialized data …
[Read more]In this blog post, we’ll review how to run Linux profilers such as perf and produce flame graphs on Kubernetes environments.
Flame graphs are a graphical representation of function calls. It shows which code paths are more busy on the CPU in given samples. They can be generated with any OS profiler that contains stack traces such as perf, eBPF, and SystemTap.
An example of a flame graph can be found below:
Each box is a function in the stack, and wider boxes mean more time the system was busy on CPU on these functions.
Kubernetes limitations
In Linux, by default, performance system events can’t be collected by unprivileged users. In regular environments, this can be easily worked around by running the profiler with a sudo privilege.
On the other hand, in Kubernetes environments, pods are the smallest deployable unit that consists of one or more containers. Exploits are generally targeted to …
[Read more]In this article we will see how we can deploy WordPress and MySQL on OKE in OCI using the MySQL Operator for Kubernetes.
Let’s see how to deploy WordPress and MySQL on a Kubernetes Cluster. The Kubernets cluster we are using is OKE (Oracle Kubernetes Engine) in OCI (Oracle Cloud Infrastructure):
OKE Cluster
We start by creating a Kubernetes Cluster on OCI using the Console:
We select the Quick create mode:
We need to name our cluster and make some choices:
When created, we can find it in the OKE Clusters list:
And we can see the pool of workers nodes and the workers:
kubectl
I like to use kubectl
directly on my latop to manage
my K8s Cluster.
On my Linux Desktop, I need to install
kubernetes-client
package (rpm).
Then on the K8s Cluster details, you can click on Access Cluster to get all the commands to use:
We need to copy them on our terminal and then, I like to also enable the bash completion for …
[Read more]As the usage of your app grows, performance can steadily decline. There’s nothing necessarily surprising by that statement, but what is surprising is the number of bottlenecks that can surface and the options available to you to fix them. One such bottleneck can be directly related to the time it takes to read from and write to your database. After all, behind the complexities of a relational database, you’re still working with storage systems that have inherent IO latency. This is where a well-architected caching system can help. A good caching system can reduce the load on your database and increase the general performance of your application. A faster application results in happier users and potentially more revenue, which is always a good thing! However, caching systems have their own setup complexities, along with a number of gotchas that might creep up unexpectedly. In this article, we’ll explore backend caching, how to implement it, how …
[Read more]This blog post discusses roles in MySQL 8.0, which are named collections of privileges. Like user accounts, roles can have privileges granted and revoked as required.
Typically, we have multiple users with the same set of privileges. Previously, the only way to grant and revoke privileges to multiple users was to change the privileges of each user individually, which was time-consuming. To make it easier, MySQL provided a new object called role. A role is a named collection of privileges.
Here are the primary SQL commands that we will be discussing in relation to managing MySQL roles:
CREATE ROLE and DROP ROLE create and remove roles. GRANT and REVOKE assign privileges to revoke privileges from user accounts and roles. SHOW GRANTS displays privilege and role assignments for user accounts and roles. SET DEFAULT ROLE specifies which account roles are active by default. SET ROLE changes the active roles within the current session. The …[Read more]
When the performance of your database server starts to decline from general usage, you have several options for optimizing it. One common method for optimizing your MySQL database is through partitioning. In this article, we’ll cover the basics of MySQL partitioning, how to apply partitioning to your database, and we'll discuss how it’s related to sharding. The basics of MySQL partitioning Partitioning is the idea of splitting something large into smaller chunks. In MySQL, the term “partitioning” means splitting up individual tables of a database. When you partition a table in MySQL, the table is split up into several logical units known as partitions, which are stored separately on disk. When data is written to the table, a partitioning function will be used by MySQL to decide which partition to store the data in. The value for one or more columns in a given row is used for this sorting process. MySQL provides several partitioning functions …
[Read more]Deep dive into MySQL’s connection handling mechanisms for optimal connection pooling and improved concurrency.
Performing an operation is always challenging when dealing with K8s.
When on-prem or DBaaS like RDS or Cloud SQL, it is relatively straightforward to apply a change. You can perform a DIRECT ALTER, use a tool such as pt-osc, or even, for certain cases where async replication is in use, perform changes on replicas and failover.
In this blog post, I’ll provide some thoughts on how schema changes can be performed when running MySQL on Kubernetes
I won’t focus on DIRECT ALTERs as it is pretty straightforward to apply them. You can just connect to the MySQL service POD and perform the ALTER.
But how can we apply changes in more complex scenarios where we may want to benefit from pt-osc, gain better control over the operation, or take advantage of the K8s features?
One convenient way that I’ve found …
[Read more]