MySQL Database Service supports migrations from a live on-premises MySQL 8.0 database to a MySQL DB system on Oracle Cloud Infrastructure (OCI) in almost real-time using replication.
Introduction/TLDR:
We are considering changing EXPLAIN in Percona Server for MySQL to require less privileges for providing execution plans for INSERT/UPDATE/DELETE statements (and possibly changing the behavior for EXPLAIN SELECT as well), to make it more convenient and safer to use with monitoring and query analysis tools. We would like to get feedback from the Community about the different approaches for achieving this.
The problem:
Running EXPLAIN is a great way to understand how complex SQL statements are executed. So it is natural that monitoring and query analysis tools utilize EXPLAIN for these purposes.
However, there is a problem for cases when INSERT/UPDATE/DELETE statements need to be explained. Running EXPLAIN for these statements, a read-only operation, requires the same privileges as running the original statements …
[Read more]
Given a table named tbl with one million entries, we
want to select a random row from this table, fast. Our table
definition looks like this:
create table tbl (
id INTEGER NOT NULL,
d VARCHAR(200) NOT NULL,
INDEX(id)
);
We can generate some test data using a recursive CTE:
mysql> set cte_max_recursion_depth = 100000;
mysql> insert into tbl
-> with recursive c(n, u) as (
-> select 1, uuid()
-> union all
-> select n+1, uuid() from c where n < 100000
-> ) select * from c ;
The Recursive CTE will generate 100k pairs of (number, uuid()).
The initial row is defined in the upper row of the
UNION, each subsequent row builds recursively on top
of that, by simply counting …
2023 is flying by and so are the weekly OpenLampTech newsletter issues. I cannot thank you enough for reading the weekly newsletter publication. But, I’ll try anyway: thanks so much! Now to this week’s issue…
The Newsletter for PHP and MySQL Developers
Receive a copy of my ebook, “10 MySQL Tips For Everyone”, absolutely free when you subscribe to the OpenLampTech newsletter.
In OpenLampTech issue #66, we have content on:
- SQL JSON columns
- Apache mod_rewrite
- MySQL Document Store
- WordPress local development cheatsheet
- And a whole lot more
If you’re not already, be sure and …
[Read more]ChatGPT is the hottest topic in the tech world right now. One story even says that ChatGPT has passed Google’s Level 3 programming interview. I wondered, does that mean ChatGPT is ready to replace MySQL DBAs, too? No. Let me show you why.
Recently, one of our clients was considering encrypting their data at rest using the Percona file-based keyring plugin. To make the process more secure, they considered removing the local keyring_file after MySQL started. So even if someone gets host access, the data files are still protected because they do not have access to the master key used to encrypt the keys for the tables running Encryption at Rest.
Let ChatGPT try its hand at MySQL administration
Let’s see what ChatGPT will say.
I asked ChatGPT the …
[Read more]Join PlanetScale’s Lead Infrastructure Engineer for Edge connectivity for an explainer on our findings regarding HTTP/3 and the MySQL protocol.
In the event that you are not planning to deploy Galera Cluster using Galera Manager on your own on-premise hosts, it is worth noting that Galera Manager supports the ability to automatically deploy a 3-node Galera Cluster in Amazon Web Services (AWS) Elastic Compute Cloud (EC2) automatically, just by suppling your API key information. Naturally, we also made a video on a step-by-step video on how to install Galera Cluster in an Amazon EC2 using Galera Manager.
It is worth noting that you can use the free tier to deploy your Galera Cluster with Galera Manager for testing purposes.
Obtain Galera Manager via filling in the form. Logon to your AWS Console. Launch just one EC2 …
[Read more]The MySQL REST Service (MRS) enables fast and secure HTTPS access for your MySQL data.
Previously, I wrote about our Terraform provider to deploy Percona Server for MySQL (Percona Server for MySQL: Automatic Cloud Deployment With Terraform) and Percona Monitoring and Management (Deploying Percona Monitoring and Management (PMM) With Terraform). Now we also added the capability to deploy Group Replication configuration with Percona Server for MySQL, and assuming we have PMM installed (see previous post), we also can automatically add Group Replication nodes to PMM monitoring.
resource "percona_ps" "psgr" {
count = 1
instance_type = "t3.micro" # for AWS
key_pair_name = "sshKey1"
password = "password"
replication_type = "group-replication" …[Read more]
Bloom filters are an essential component of an LSM-based database engine like MyRocks. This post will illustrate through a simple example how bloom filters work in MyRocks.
Why?
With MyRocks/RocksDB, data is stored in a set of large SST files. When MyRocks needs to find the value associated with a given key, it uses a bloom filter to guess if the key could potentially be in an SST file.
How?
A bloom filter is a space-efficient way of storing information about a list of keys. At its base, there is a bitmap and a hash function. The hash value of the keys stored in an SST is computed, and the results are used to set some bits to “1” in the bitmap. When you want to know if a key is present or not in the list, you run it through the hash function and check if the corresponding bits in the bitmap are …
[Read more]