Oct 02, 2009 |
MySQL, Percona Events
I spoke at EdUIConf 2009, a new conference in my hometown of Charlottesville, Virginia. My presentation was on web interface performance; it’s basically a twist on front-end performance in general. I slanted the talk towards web developers, rather than assuming the audience has full control over their Apache configuration. The conference was relatively short — […]
Sep 29, 2009 |
MySQL
Recently I was doing a little work for a client who has MyISAM tables with many columns (the same one Peter wrote about recently). The client’s performance is suffering in part because of the number of columns, which is over 200. The queries are generally pretty simple (sums of columns), but they’re ad-hoc (can access […]
Sep 28, 2009 |
Insight for DBAs, MySQL
This is a very old draft, from early 2007 in fact. At that time I started to look into something interesting with the index cardinality statistics reported by InnoDB tables. The cardinality varies because it’s derived from estimates, and I know a decent amount about that. The interesting thing I wanted to look into was […]
Aug 29, 2009 |
Insight for Developers
I have run into a number of cases recently that all had a similar look and feel. In most of these cases, the symptoms were very complicated, but they boiled down to just a few problems that can be prevented in very simple ways. If you are not doing any of the following three simple […]
Aug 16, 2009 |
Benchmarks
Ever wondered how fast stored routines are in MySQL? I just ran a quick micro-benchmark to compare the speed of a stored function against a “roughly equivalent” subquery. The idea — and there may be shortcomings that are poisoning the results here, your comments welcome — is to see how fast the SQL procedure code […]
Jul 07, 2009 |
Percona Events
This is just a public service announcement (reminder?) that LenZ and Giuseppe are planning OpenSQL Camp 2009, this time in Europe, which is great. It’ll be part of FrOSCon. I wish I could say that I’ll attend, but due to various unpredictabilities in my family, I can’t plan that far ahead. I don’t yet know […]
Jul 01, 2009 |
Insight for DBAs
For the last couple of months, we’ve been quietly developing a MySQL protocol parser for Maatkit. It isn’t an implementation of the protocol: it’s an observer of the protocol. This lets us gather queries from servers that don’t have a slow query log enabled, at very high time resolution. With this new functionality, it becomes […]
Jun 15, 2009 |
Insight for DBAs
When I’m looking at a server, I often want to see the /etc/my.cnf file nicely formatted, and with comments stripped. This Perl one-liner will pretty-print the file:
|
perl -ne 'm/^([^#][^\s=]+)\s*(=.*|)/ && printf("%-35s%s\n", $1, $2)' /etc/my.cnf [client] port = 3306 socket = /var/run/mysqld/mysqld.sock [mysqld_safe] socket = /var/run/mysqld/mysqld.sock nice = 0 [mysqld] user = mysql pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port = 3306 .... |
Jun 05, 2009 |
Insight for DBAs
I wanted to share a little rule of thumb I sometimes use to choosing column order in indexes. This is not specific to MySQL, it’s generally applicable to any database server with b-tree indexes. And there are a bunch of subtleties, but I will also ignore those for the sake of simplicity. Choosing Column Order […]
May 14, 2009 |
Insight for DBAs
I see a lot of people filtering replication with binlog-do-db, binlog-ignore-db, replicate-do-db, and replicate-ignore-db. Although there are uses for these, they are dangerous and in my opinion, they are overused. For many cases, there’s a safer alternative.
Apr 15, 2009 |
Insight for DBAs
Sometimes a MySQL server running InnoDB takes a long time to shut down. The usual culprit is flushing dirty pages from the buffer pool. These are pages that have been modified in memory, but not on disk. If you kill the server before it finishes this process, it will just go through the recovery phase […]
Mar 19, 2009 |
Insight for DBAs
I feel like I’ve been seeing this a lot lately. occasionally, seemingly innocuous selects take unacceptably long. Or Over the past few weeks, we’ve been having bizarre outages during which everything seems to grind to a halt… and then fixes itself within 5 minutes. We’ve got plenty of memory, we’re not running into swap, and […]
Mar 09, 2009 |
Percona Events
Even though we haven’t yet gotten a schedule online, we’re still accepting proposals for the Percona Performance Conference. As a teaser, let me just share one accepted proposal with you: Cary Millsap. If you are even vaguely involved with Oracle, you should know who he is. He is one of the world’s foremost authorities on […]
Mar 05, 2009 |
Insight for Developers
If you were interviewing to work at Percona, and I asked you “what does Using filesort mean in EXPLAIN,” what would you say? I have asked this question in a bunch of interviews so far, with smart people, and not one person has gotten it right. So I consider it to be a bad interview […]
Feb 13, 2009 |
Percona Events
Percona is hiring. We’ve added several experts recently and we’re growing at a fast but sustainable pace. The demand for our services is strong, and we have openings for more experts in the next couple of months. Let me explain a little about what we’re looking for at the moment. While we do have a […]
Feb 12, 2009 |
Insight for DBAs
I vaguely recall a couple of blog posts recently asking something like “what’s the formula to compute mysqld’s worst-case maximum memory usage?” Various formulas are in wide use, but none of them is fully correct. Here’s why: you can’t write an equation for it.
Feb 05, 2009 |
Percona Events
…any sessions this year; Peter, Vadim, and the rest of us at Percona submitted over a dozen session proposals, which were initially declined. As …Cabral is organizing.
That’s the back story — now on to the Percona Performance Conference! This is not “another MySQL conference.” It’s a performance…to Santa Clara.
We will not be the only ones speaking at Percona Performance Conference; other experts will join us in making presentations too. …to propose a session, please do so through the Percona Performance Conference website.
The Percona team looks forward to greeting you face to face …
Feb 01, 2009 |
Insight for DBAs
One of my favorite MySQL configurations for high availability is master-master replication, which is just like normal master-slave replication except that you can fail over in both directions. Aside from MySQL Cluster, which is more special-purpose, this is probably the best general-purpose way to get fast failover and a bunch of other benefits (non-blocking ALTER […]
Jan 28, 2009 |
Insight for DBAs
Are you running MySQL on Debian or Ubuntu with InnoDB? You might want to disable /etc/mysql/debian-start. When you run /etc/init.d/mysql start it runs this script, which runs mysqlcheck, which can destroy performance. It can happen on a server with MyISAM tables, if there are enough tables, but it is far worse on InnoDB. There are […]
Jan 23, 2009 |
Insight for Developers
How smart is the MySQL optimizer? If it sees an expression repeated many times, does it realize they’re all the same and not calculate the result for each of them? I had a specific case where I needed to find out for sure, so I made a little benchmark. The query looks something like this: