So I tried to do my first set of benchmarks and testing on
RocksDB today, but I ran into a problem and had to file a
bug:
https://github.com/facebook/mysql-5.6/issues/365
MySQL @ Facebook RocksDB appears to store at least 2x the size of
the volume of changes in a transaction. I don't know how much
space for the row + overhead there is in each transcation, so I'm
just going to say 2x the raw size of the data changed in the
transaction, as approximation. I am not sure how this works for
updates either, that is whether old/new row information is
maintained. If old/row data is maintained, then a pure update
workload you would need 4x the ram for the given transactional
changes. My bulk load was 12GB of raw data, so it failed as I
have only 12GB of RAM in my test system.
The workaround (as suggested in the bug) is to set two
configuration …
The latest from the MySQL community
Ideas, releases, practical guides, and perspectives from the people building with MySQL.
In previous blog posts we explained how to perform certain actions in a MySQL database set up as a document store using Connector/Node.js. In this blog post we are going to use some of the examples covered to explain how to start working with an application created with Express.js, AngularJS, Node.js, and MySQL Connector/Node.js.
Required
Optional
- …
InnoDBOnline buffer pool resize:
- Configure innodb_buffer_pool_size offline (at startup) or online, while the server is running
- The operation is performed in chunks
- Chunk size is defined by the innodb_buffer_pool_chunk_size configuration option
- Buffer pool size always be equal to or a multiple of innodb_buffer_pool_chunk_size * innodb_buffer_pool_instances
- Default innodb_buffer_pool_chunk_size is 128M
Reference:
https://dev.mysql.com/doc/refman/5.7/en/innodb-buffer-pool-resize.html
Online RENAME INDEX operation:
- ALTER TABLE RENAME INDEX requires only meta-data change.
Reference:
…
Prepare the RPM repository server
Install the software to create a RPM repository server (on an Ubuntu web server):
shell> sudo apt-get install createrepo
Create the directory structures and initialize the repositories:
shell> sudo mkdir -p /var/www/html/repos/centos/7/os/x86_64 shell> sudo createrepo /var/www/html/repos/centos/7/os/x86_64/
Copy the MySQL Enterprise RPM packages to the repository:
shell> sudo cd /var/www/html/repos/centos/7/os/x86_64/ shell> sudo unzip -v /download/V790254-01.zip # MySQL Enterprise Server 5.7.16 Archive: /download/V790254-01.zip Length Method Size Cmpr Date Time CRC-32 Name --------- ------ -------- ---- ---------- ----- -------- ---- 23979568 Stored 23979568 0% 2016-09-29 16:56 ae6693b1 mysql-commercial-client-5.7.16-1.1.el7.x86_64.rpm 45327096 Stored 45327096 0% 2016-09-29 16:56 bb83c965 …[Read more]
The pt-online-schema-change tool has been a workhorse for years, allowing MySQL DBAs to alter tables with minimal impact to application workload, and before MySQL had native online alter capabilities. Although consistently grateful for the tool’s existence, I never liked the messiness of having to use and clean up triggers, and most DBAs have a horror story or two to tell about using any of the online alter methods.
When Github’s online schema transmogrifer (gh-ost; https://github.com/github/gh-ost) was released, then, I jumped on the chance to test it out.
Following are my testing notes. I tried out the flags available to run gh-ost from different locations in a replication setup, both functionally and under load. The load applied was via mysqlslap, using a …
[Read more]
MySQL Cluster uses a distributed architecture where we have one
primary
replica and one or more backup replicas of all data in the
cluster.
In previous versions we have not supported reading from the
backup
replicas. The reason for this comes from the transaction
algorithm in
the NDB storage engine. When the transaction have committed we
have
unlocked the rows in the primary replica, but the locks in the
backup
replica is unlocked in the complete phase.
The impact of this is that we could potentially perform an
update
of a row and then immediately read it and not see our own write.
To
avoid this problem we have avoided to read the backup
replica.
If it is important to read the backup replica then we need to
ensure
that transactions are not reported back to the user until the
complete
phase.
When we decided to support read from …
This blog post discusses the ramifications of STRICT mode in MySQL 5.7.
In short
By default, MySQL 5.7 is much “stricter” than older versions of MySQL. That can make your application fail. To temporarily fix this, change the
SQL_MODE
to
NO_ENGINE_SUBSTITUTION
(same as in MySQL 5.6):
mysql> set global SQL_MODE="NO_ENGINE_SUBSTITUTION";
MySQL 5.7, dates and default values
The default
SQL_MODE
in MySQL 5.7 is:
ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
That makes MySQL operate in “strict” mode for transactional tables.
“Strict mode …
[Read more]The Theory
Generated Columns is a feature released on MySQL 5.7. They can be used during
CREATE TABLE or ALTER TABLE statements.
It is a way of storing data without actually sending it through
the INSERT or UPDATE clauses in SQL.
The database resolves what the data will be.
There are two types of Generated Columns: Virtual and Stored. They work with:
- mathematical expressions (
product_price*quantity) - built-in functions (
RIGHT(),CONCAT(),FROM_UNIXTIME(),JSON_EXTRACT()) - literals (“2”, “new”, 0)
Besides that, they can be indexed but they don’t allow …
[Read more]In this blog post, we’ll explain how to update the signing key for Percona Debian and Ubuntu packages.
Some of the users might have already noticed following warning on Ubuntu 16.04 (Xenial Xerus):
W: http://repo.percona.com/apt/dists/xenial/InRelease:
Signature by key 430BDF5C56E7C94E848EE60C1C4CBDCDCD2EFD2A uses
weak digest algorithm (SHA1)
when running apt-get update.
Percona .deb packages are signed with a key that
uses an algorithm now considered weak. Starting with
the next release, Debian and Ubuntu
packages are signed with a new key that uses the much
stronger SHA-512 algorithm. All future package release will also
contain the new algorithm.
You’ll need to do one of the …
[Read more]This blog discusses the gradual end of MyISAM in MySQL.
The story that started 20 years ago is coming to its end. I’m talking about the old MyISAM storage engine that was the only storage provided by MySQL in 1995, and was available in MySQL for 20+ years. Actually, part of my job as a MySQL consultant for 10+ years was to discover MyISAM tables and advise customers how to convert those to InnoDB.
(Check your MySQL installation, you may still have MyISAM tables).
MySQL 5.7 still used MyISAM storage for the system tables in the MySQL schema.
In MySQL 8.0 (DMR version as of writing), the MyISAM storage engine is still available. But in a very limited scope:
- After …