Prior to version 5.0, MySQL could only use one index per table in a given query without any exceptions; folks that didn’t understand this limitation would often have tables with lots of single-column indexes on columns which commonly appeared in their WHERE clauses, and they’d wonder why the EXPLAIN plan for a given SELECT would […]
Inspiration for this post is courtesy of a friend and former colleague of mine, Greg Youngblood, who pinged me last week with an interesting MySQL puzzle. He was running Percona Server 5.5.21 with a table structure that looks something like this:
CREATE TABLE foo (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
uid INT UNSIGNED NOT NULL,
update_time DATETIME NOT NULL,
INDEX `uid` (uid, update_time),
INDEX `bar` (some_other_columns)
When he ran this query:
SELECT MIN(update_time) FROM foo WHERE update_time IS NOT NULL AND update_time <> '0000-00-00 00:00:00';
The result came back as 2012-06-22 10:28:16. […]
As Mark pointed out, there isn’t a lot of detail in the release notes about what could potentially be a very serious problem that is fixed in MySQL 5.1.60. I’ll repeat here the full documentation from the release notes: “InnoDB Storage Engine: Data from BLOB columns could be lost if the server crashed at a precise […]
I recently worked on a customer case where at seemingly random times, inserts would fail with Innodb error 139. This is a rather simple problem, but due to it’s nature, it may only affect you after you already have a system running in production for a while.
It’s finally here! Percona Server Percona Server 5.5.8-20.0 is now available for download. This is a beta release of Percona’s enhancements to the MySQL 5.5.8 server. Here are some highlights: Performance and scalability improvements throughout the server and storage engine Optimizations for flash storage such as SSD, Virident, and FusionIO Optimizations for cloud computing The […]
Dear Community, Percona Server version 5.1.50-rel12.1 RC is now available for download. Functionality Added or Changed Percona Server 5.1.50-rel12.1 is now based on MySQL 5.1.50. New Features Added: innodb_lru_dump_restore – Implemented automatic dumping of the buffer pool at specified intervals. innodb_buffer_pool_shm – Implemented option ”innodb_buffer_pool_shm_checksum”; when enabled, shared memory buffer pool is checksum validated. This […]
MySQL 5.1 introduces row based binary logging. In fact, the default binary logging format in GA versions of MySQL 5.1 is ‘MIXED’ STATEMENT*; The binlog_format variable can still be changed per sessions which means it is possible that some of your binary log entries will be written in a row-based fashion instead of the […]
It is very common for me to look at a customer’s database and notice a lot of overhead from checking whether a database connection is active before sending a query to it. This comes from the following design pattern, written in pseudo-code:
function query_database(connection, sql)
if !connection.is_alive() and !connection.reconnect() then
Many of the popular development platforms do something similar to this. Two […]
Note: This blog post is part 1 of 4 on building our training workshop.
The Percona training workshop will not cover sharding. If you follow our blog, you’ll notice we don’t talk much about the subject; in some cases it makes sense, but in many we’ve seen that it causes architectures to be prematurely complicated.
So let me state it: You don’t want to shard.
Optimize everything else first, and then if performance still isn’t good enough, it’s time to take a very bitter medicine. The reason you need to shard basically comes down to one of these two reasons
For a couple of months there have been no updates to our msl patch, however recently I managed some time to change this. The functionality was extended a little bit and whatâ€™s even more important the patch is available for all the recent MySQL releases. To remind anyone who has not yet come across this […]