Happy Birthday MySQL ! Turned 23 today !
There was an interesting question on Stackoverflow.com on
extracting values from a JSON data type column in a MySQL
database. What caught my eye was the the keys for the
key/value pairs were numeric. In particular the author of the
question only wanted values for the key named 74.
The sample data was fairly simple.
{ "70" : "Apple", "71" : "Peach", "74" : "Kiwi" }
I thought SELECT JSON_EXTRACT(column, '$.74') FROM table;
should work but it did not. There was a complaint about an
invalid path expression.
It turns out that you need to make the second argument in the
function '$."74"' or SELECT JSON_EXTRACT(column,'$."74"') FROM
table;
File this under something to remember for later. :-)
Percona announces the release of Percona Toolkit 3.0.10 on May 22, 2018.
Percona Toolkit is a collection of advanced open source command-line tools, developed and used by the Percona technical staff, that are engineered to perform a variety of MySQL®, MongoDB® and system tasks that are too difficult or complex to perform manually. With over 1,000,000 downloads, Percona Toolkit supports Percona Server for MySQL, MySQL®, MariaDB®, Percona Server for MongoDB and MongoDB.
Percona Toolkit, like all Percona software, is free and open source. You can download packages …
[Read more]If you’re someone who keeps up with the Go development cycle, then you’ll know that a couple of weeks ago Go entered its feature-freeze for the Go 1.11 release. One of the changes for this upcoming release that caught my eye was to the database/sql package. Daniel Theophanes contributed a change that introduces several new counters available via the DB.Stats() method.
If you’re not familiar with it, DB.Stats() returns a DBStat structure containing information about the underlying sql.DB that the method is called on. Up to this point, the struct has had a single field, tracking the current number of open connections to the database. Daniel’s patch introduces a number of …
[Read more]If you’re someone who keeps up with the Go development cycle, then you’ll know that a couple of weeks ago Go entered its feature-freeze for the Go 1.11 release. One of the changes for this upcoming release that caught my eye was to the database/sql package. Daniel Theophanes contributed a change that introduces several new counters available via the DB.Stats() method.
If you’re not familiar with it, DB.Stats() returns a DBStat structure containing information about the underlying sql.DB that the method is called on. Up to this point, the struct has had a single field, tracking the current number of open connections to the database. Daniel’s patch introduces a number of …
[Read more]In this article, I’ll explain about the multi version concurrency control (MVCC) of large objects (LOBs) design in the MySQL InnoDB storage engine. MySQL 8.0 has a new feature that allows users to partially update large objects, including the JSON documents. …
In the Replication QA team, we have been continuing to improve test coverage for Replication and Group Replication primarily to ensure that we support the newest and latest offerings of MySQL Server 8.0 such as Generated Columns, Set Persist, User Roles, and User Management DDLs that are now atomic.…
Please join Percona’s Principal Support Escalation Specialist, Sveta Smirnova, as she presents Troubleshooting MySQL Concurrency Issues with Load Testing Tools on Wednesday, May 23, 2018 at 11:00 AM PDT (UTC-7) / 2:00 PM EDT (UTC-4).
Normally, we use benchmarking tools when we are developing applications. When applications are deployed, benchmarks tests are usually too late to help.
This webinar doesn’t cover actual benchmarks, but it does look at how you can use benchmarking tools for troubleshooting. When you need to repeat a situation caused by concurrent client execution, they can be your best …
[Read more]In this blog post, I will show you how to use Percona Monitoring and Management (PMM) to capture per-process metrics in five minutes or less.
While Percona Monitoring and Management (PMM) captures a lot of host metrics, it currently falls short providing per-process information, such as which particular process uses a lot of CPU resources, causes Disk IO or consumes a lot of memory.
In our database performance optimization and troubleshooting practice, this information has proven quite useful in many cases: batch jobs taking much more resources than developers would estimate and misconfigured Percona XtraBackup or Percona Toolkit are among the most common offenders.
Per-process metrics information can also be very helpful when troubleshooting database software memory leaks or memory fragmentation.
You …
[Read more]The UTF-8 is a variable-length encoding. In the case of UTF-8, it means that storing one code point requires one to four bytes. But, In MySQL’s encoding called “utf8” only stores a maximum of three bytes per code point. In the modern web / mobile applications, we have to support for storing not only language characters but also symbols and emojis, Let me show you below some very weird issues faced using MySQL “utf8” :
mysql> SET NAMES utf8; # just to emphasize that the connection charset is set to `utf8` Query OK, 0 rows affected (0.00 sec) mysql> UPDATE custfeeds.reactions SET reacted = 'super like ' WHERE id = 13015; Query OK, 1 row affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 1 mysql> SELECT reactions FROM custfeeds.reactions WHERE id = 13015; +-------------+ | reactions | +-------------+ | super liked | +-------------+ 1 row in set (0.00 sec) mysql> SHOW WARNINGS; …[Read more]