Mar 23, 2021 |
Insight for DBAs, Insight for Developers, MySQL, Percona Software
Starting a long time ago, we wanted to reproduce workload in a non-production environment, and there were different attempts to achieve that goal (Query Playback is just one of them). But there is another point of view, where you need to write your own workload to do so. Both Have Pros and Cons Reproduce Workload: […]
Aug 28, 2020 |
Insight for DBAs, MySQL, Open Source, ProxySQL
We sometimes receive challenging requests… this is a story about one of those times. The customer has implemented a sharding solution and would like us to review alternatives or improvements. We analyzed the possibility of using ProxySQL as it looked to be a simple implementation. However, as we had 200 shards we had to implement […]
May 13, 2020 |
Insight for DBAs, MySQL, Percona Software
pt-online-schema-change emulates the way that MySQL alters tables internally, but it works on a copy of the table you wish to alter. It executes INSERT statements to import the data, that runs in a single connection to fill the new table. In this repository, there is a script called myloader_pt-osc.sh that uses myloader to execute […]
Jan 02, 2020 |
MySQL, ProxySQL
ProxySQL and Orchestrator are usually installed to achieve high availability when using MySQL replication. On a failover (or graceful takeover) scenario, Orchestrator will promote a slave, and ProxySQL will redirect the traffic. Depending on how your environment is configured, and how long the promotion takes, you could end up in a scenario where you need […]
Oct 03, 2018 |
Insight for DBAs, Insight for Developers, MySQL
Some time ago, a customer had a performance issue with an internal process. He was comparing, finding, and reporting the rows that were different between two tables. This is simple if you use a LEFT JOIN and an
IS NULL comparison over the second table in the WHERE clause, but what if the column could be null? That […]
Jun 19, 2018 |
Insight for DBAs, MySQL
Since MySQL 5.7.5, we have been able to resize dynamically the InnoDB Buffer Pool. This new feature also introduced a new variable — innodb_buffer_pool_chunk_size — which defines the chunk size by which the buffer pool is enlarged or reduced. This variable is not dynamic and if it is incorrectly configured, could lead to undesired situations. […]
Apr 17, 2018 |
MySQL
In this blog post, we’ll look at using hints to analyze queries. There are a lot of things that you can do wrong when writing a query, which means that there a lot of things that you can do to make it better. From my personal experience there are two things you should review first: The table […]
Jan 02, 2018 |
Insight for DBAs, Insight for Developers, MySQL, ProxySQL
In this post, we’ll look at how to improve queries using generated columns and ProxySQL instead of implementing a referenced table. Developers and architects don’t always have the time or complete information to properly analyze and design a database. That is why we see tables with more fields than needed, or with incorrect types. The […]
May 03, 2017 |
Benchmarks, Insight for DBAs, MySQL
A lot of things have been said about UUID, and storing UUID in an optimized way. Now that we have generated columns, we can store the decomposed information inside the UUID and merge it again with generated columns. This blog post demonstrates this process. First, I used a simple table with one char field that I called […]
Oct 21, 2016 |
MySQL, Percona Software
In this blog post, we’ll look at how replication triggers a Performance Schema issue on Percona XtraDB Cluster. During an upgrade to Percona XtraDB Cluster 5.6, I faced an issue that I wanted to share. In this environment, we set up three Percona XtraDB Cluster nodes (mostly configured as default), copied from a production server. We […]
Sep 09, 2015 |
Benchmarks, MySQL, Percona Software
There are cases where we need to implement MySQL partitioning, or at least test if it is an option to solve an issue. However, how are we able to test it when the table on our production environment has hundreds of millions of rows, several composite indexes and/or the size on disk is hundreds of gigabytes? Testing […]
Jun 15, 2015 |
MySQL
We usually try to avoid subselects because sometimes they force the use of a temporary table and limits the use of indexes. But, when is good to use a subselect? This example was tested over table a (1310723 rows), b, c and d ( 5 rows each) and with MySQL version 5.5 and 5.6. Let’s […]
Jan 21, 2015 |
Benchmarks, Insight for DBAs, MySQL
Mydumper is known as the faster (much faster) mysqldump alternative. So, if you take a logical backup you will choose Mydumper instead of mysqldump. But what about the restore? Well, who needs to restore a logical backup? It takes ages! Even with Myloader. But this could change just a bit if we are able to take […]