You are here

MySQL Performance Blog

MySQL Performance Blog
Checked: 2 hours 20 min ago
Updated: 2 hours 20 min ago
Update every: 2 hours

Subscribe to MySQL Performance Blog

Troubleshooting Relay Log Corruption in MySQL

MySQL Performance Blog - Sun, 03/08/2008 - 3:56am

Have you ever seen the replication stopped with message like this:

Last_Error: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave.

How adding another table to JOIN can improve performance ?

MySQL Performance Blog - Sat, 02/08/2008 - 5:10am

JOINs are expensive and it most typical the fewer tables (for the same database) you join the better performance you will get. As for any rules there are however exceptions :)

Percona turns two today !

MySQL Performance Blog - Sat, 02/08/2008 - 2:34am

July 31st 2006 was my last day working for MySQL and August 1st I started what later was incorporated Percona with Vadim joining me September 1st as co-founder.

Two years is a significant anniversary for any startup - surviving (and being profitable) for 2 years can be seen as validation of our business model and strategy and we’re quite happy about this.

Percona RPMS for RedHat 5 / CentOS 5 x86_64

MySQL Performance Blog - Fri, 01/08/2008 - 12:19am

We prepared RPMs of our release for RedHat 5 / CentOS 5 x86_64 platform.

There was question what patcheset includes and if there is manuals.
We have:

Quick tip: how to convert tables to InnoDB

MySQL Performance Blog - Wed, 30/07/2008 - 7:08pm

I use Maatkit for a lot of grunt work and thought you might appreciate this quick tip. Suppose you have a bazillion tables to convert from MyISAM to InnoDB, but they are mixed in with other tables that are already InnoDB, or are another storage engine that you don't want to touch.

  1. mk-find <db_name> --engine MyISAM --exec "ALTER TABLE %D.%N ENGINE=INNODB" --print

Report from OSCON 2008

MySQL Performance Blog - Mon, 28/07/2008 - 4:04am

So I’m back from OSCON 2008. As usually it is fun conference to attend. Though I could only come for couple of days (Wed/Thu) as things are too busy here.

The #1 mistake hosting providers make for MySQL servers

MySQL Performance Blog - Fri, 25/07/2008 - 9:13pm

This article is not meant to malign hosting providers, but I want to point out something you should be aware of if you’re getting someone else to build and host your servers for you.

Most hosting providers — even the big names — continue to install 32-bit GNU/Linux operating systems on 64-bit hardware. This is a serious mistake.

Daniel Nichter and Percona join forces on Maatkit

MySQL Performance Blog - Fri, 25/07/2008 - 12:54pm

Daniel Nichter, the author of several very useful MySQL tools, has joined with Percona to continue to improve Maatkit — the “other” toolkit we rely on daily. Daniel is a skilled Perl programmer who understands MySQL. He is in a perfect position to move the project forward on a more regular basis than I’ve been able to commit time to since I’ve taken on a leadership role in Percona.

MySQL Binaries with patches

MySQL Performance Blog - Fri, 25/07/2008 - 2:58am

As there were many requests for Debian binary packages in our announcement of MySQL releases with custom patchsets, we decided to play with it and built .deb, which you can find there:

Sphinx 0.9.8 is released just in time for OSCON 2008

MySQL Performance Blog - Mon, 21/07/2008 - 2:01am

As you probably already seen in a post by Baron, Sphinx Release 0.9.8 is finally out, just in time for OSCON 2008. Even though it is “minor release” if you look at the number, it is major release in practice (and you can view snapshots as minor releases). The changes since 0.9.7 are dramatic with over 70 new features corresponding to over 15 months of work.

Missing Data - rows used to generate result set

MySQL Performance Blog - Sun, 20/07/2008 - 5:01pm

As Baron writes it is not the number of rows returned by the query but number of rows accessed by the query will most likely be defining query performance. Of course not all row accessed are created equal (such as full table scan row accesses may be much faster than random index lookups row accesses in the same table) but this is very valuable data point to optimize query anyway.

MySQL 5.1 is to reach GA state - all to arms !

MySQL Performance Blog - Sun, 20/07/2008 - 12:48am

MySQL 5.1 was in RC stage for around 10 months now finally planned to be released as GA soon. As Monty Says MySQL 5.1.26 will be renamed as GA if no serious bugs are discovered.

Lets help MySQL to ensure GA release will be indeed GA quality and support Monty in his call to ensure this RC candidate works well for you.

MySQL releases with Percona patchsets

MySQL Performance Blog - Thu, 17/07/2008 - 4:08am

Percona has a strong team of MySQL developers and consultants on board, so we decided to prepare MySQL releases with our patches and third-party patches which we think are very useful. We actually use these internally and for our customers.

Current releases include:

How to Outrun the Lions

MySQL Performance Blog - Sun, 13/07/2008 - 4:11pm

I just posted slides from a talk I gave at a Facebook application developer conference in Las Vegas this weekend. The talk is titled Outrun the Lions. Our customers run several of the top 10 applications on Facebook right now (as measured by the number of active users), and I revealed the secrets to building applications that can handle the load.

LVM Configuration mistake to Avoid

MySQL Performance Blog - Thu, 10/07/2008 - 4:34am

One of our customers was setting up box for MySQL LVM backups. The box had 2 RAID volumes (internal drives and enclosure) with database being stored on enclosure drives and internal drives used pretty much for OS and logs (database grew too large and so was moved to enclosure completely).

As database was large and active I thought it would make sense to have LVM undo space located on the internal drives so LVM and backup has less backup on the running system.

Logging your MySQL command line client sessions

MySQL Performance Blog - Tue, 08/07/2008 - 7:13pm

Baron recently wrote about very helpful but often forgotten about “Pager” feature of command line client. There is another one which falls into the same list - the –tee option.

Specifying –tee=/path/to/file.log you can get all session content (everything typed in and printed out) stored in the log file. Quite handy for example to keep track of changes done on production.

Velocity Presentation Slides Published

MySQL Performance Blog - Tue, 08/07/2008 - 5:39pm

I’ve now published slides from my talk at Velocity conference on Percona web site. Enjoy.

Entry posted by peter | No comment


MySQL Performance Blog - Tue, 08/07/2008 - 3:28am

As you probably know MySQL Replication (statement based) works by fetching statements from MASTERs binary log and executing them on the SLAVE. Since MySQL 4.0 this process is a bit more involved having events passing via relay logs on the Slave which also means there are two replication threads "IO Thread" and "SQL Thread" used in the process but idea remains the same.

Speaking on OSCON 2008

MySQL Performance Blog - Sun, 06/07/2008 - 7:09pm

It looks like I never blogged about it but I’m going to be speaking on OSCON 2008. Similar to the last year presentation I’ll do overview of MySQL Open Source storage engines. I’ll do brief overview of different storage engines available out there as well as share benchmark results for some of them.

Entry posted by peter | No comment

Recovering Innodb table Corruption

MySQL Performance Blog - Fri, 04/07/2008 - 8:27am

Assume you're running MySQL with Innodb tables and you've got crappy hardware, driver bug, kernel bug, unlucky power failure or some rare MySQL bug and some pages in Innodb tablespace got corrupted. In such cases Innodb will typically print something like this:

How to load large files safely into InnoDB with LOAD DATA INFILE

MySQL Performance Blog - Thu, 03/07/2008 - 7:23pm

Recently I had a customer ask me about loading two huge files into InnoDB with LOAD DATA INFILE. The goal was to load this data on many servers without putting it into the binary log. While this is generally a fast way to load data (especially if you disable unique key checks and foreign key checks), I recommended against this. There are several problems with the very large transaction caused by the single statement. We didn't want to split the file into pieces for the load for various reasons.

Should we proclaim MySQL Community Edition Dead ?

MySQL Performance Blog - Wed, 02/07/2008 - 2:41am

We were chatting with Jeremy Cole today and he brought to my attention last version of MySQL Community Eddition (5.0.51) was released in November 2007 - over 7 months ago. MySQL 5.0.51a and MySQL 5.0.51b security fixes were released but these can't be considered proper releases.

MySQL 5.1 Stability

MySQL Performance Blog - Mon, 30/06/2008 - 9:08pm

I have been helping customer today to resolve his lockups in production by downgrading from MySQL 5.1.25 to 5.0 We have other customers (and our own projects as well) which run on MySQL 5.1 successfully but I can't it is on par with MySQL 5.0 stability yet.

This given customer was running MyISAM on FreeBSD with quite basic queries, so may be there are some issues with FreeBSD and MySQL 5.1 still ?

Entry posted by peter | 11 comments

Resyncing table on MySQL Slave

MySQL Performance Blog - Mon, 30/06/2008 - 4:41am

Sometimes MySQL Replication may run out of sync - because of its own buts or operational limitations or because of application mistake, such as writing to the slave when you should be only writing to the master. In any case you need slave to be synced with Master.

To discover the difference between Master and Slave you can use excellent Maatkit tool though if you you just need to resync small single table it may be easy to do it other way:

Assuming your table schema does not change you can do something like this on the master:

Web Site Optimization: FrontEnd and BackEnd

MySQL Performance Blog - Thu, 26/06/2008 - 7:04pm

I spent Monday and Tuesday this week on Velocity Conference It was
quite interesting event worth attending and it was very good to see
the problems in this are going beyond Apache, PHP, Memcache and MySQL.


Subscribe to MySQL Performance Blog