Killing long-running idle transactions is a good way to increase the uptime of a MySQL server. This may sound strange, but open transactions will eventually bring the server down, and it is better to hurt a single application than the many that will be hurt when that happens.
Long-running idle transactions are usually caused by a programmer mistake or an unexpected condition that causes an application not to be able to do its work. The potential number of sources for such problems is unlimited, so it’s virtually impossible to prevent long-running transactions.
Recently I had a case when a customer deleted the InnoDB main table space – ibdata1 – and redo logs – ib_logfile*.
MySQL keeps InnoDB files open all the time. The following recovery technique is based on this fact and it allowed to salvage the database.
Actually, the files were deleted long time ago – 6 months or so. As long as file is open physically it still exits in the file system and reachable to processes which have opened it.
I’m hosting MySQL Indexes: Best Practices Webinar next week, Wednesday August 15. In which I will talk about how MySQL indexes are structured and how they can be used, as well as go over the best practices in selecting correct indexes for your database workloads.
The use of tmpfs/ramfs as /tmp partition is a common trick to improve the performance of on-disk temporary tables. Servers usually have less RAM than disk space so those kind of partitions are very limited in size and there are some cases were we can run out of space.
Let’s see one example. We’re running a typical master-slave replication with ROW based binary log file. The application connects to the database using persistent connection technique to avoid creating new connections for every request so it just recycle old connections.
Please join us at the DOUG (DALLAS ORACLE USERS GROUP) MySQL Forum meeting on Tuesday September 4th, 2011 from 5:00 pm – 6:30 pm (different than the usual meeting time, pizza BEFORE the meeting).
MySQL 101 — The Basics
Ever wanted to get started with MySQL? This presentation is an introduction that will cover installation, starting/stopping, monitoring, and administering MySQL. You will walk away from this meeting with the basic skills needed to run simple MySQL instances. Pre-install on your laptop and follow along!
Some people want to use a backup to prepare a new Percona XtraDB Cluster node. They want this to avoid State Snapshot Transfer that could slow down the donor (depending of the SST method you are using, the donor can be blocked. I will cover this in a future blog post). As backup are generally performed during non-peak time, the effect should be reduced, and this avoid the need of performing 2 backups: the usual backup and the SST).
So to be able to use a backup for this purpose, we have 3 prerequisites:
I'm doing a lot of stored routine programming lately, working on common_schema. I'm in particular touching at the extremes of abilities. Some things just can't be done from within a stored routine. Here's a list of can't be done: