Search Results for: two tables

Lost innodb tables, xfs and binary grep

Before I start a story about the data recovery case I worked on yesterday, here’s a quick tip – having a database backup does not mean you can restore from it. Always verify your backup can be used to restore the database! If not automatically, do this manually, at least once a month. No, seriously […]

Sharing an auto_increment value across multiple MySQL tables

The title is SEO bait – you can’t do it. We’ve seen a few recurring patterns trying to achieve similar – and I thought I would share with you my favorite two: Option #1: Use a table to insert into, and grab the insert_id:

Option #2: Use a table with one just row:

Two Types of MySQL Users

In comments to my previous post I got number number of comments saying if MySQL would not have multiple storage engine interface it would not allow people to do various very cool stuff. And I agree with this. The question is how cool you want your database operation to be ? Visiting customers I see […]

Copying InnoDB tables between servers

The feature I announced some time ago is now available in our latest releases of XtraBackup 0.8.1 and XtraDB-6. Now I am going to show how to use it (the video will be also available on Let’s take tpcc schema and running standard MySQL ® 5.0.83, and assume we want to copy order_line […]

How network can impact MySQL Operations ?

This week I’ve worked with the customer doing certain work during maintenance window which involved a lot of data copying around between MySQL boxes. We had prepared well and had measured how fast we could copy the data between servers of these kind connected to the same network, and we did the same thing before. […]

Efficient Boolean value storage for Innodb Tables

Sometimes you have the task of storing multiple of boolean values (yes/now or something similar) in the table and if you get many columns and many rows you may want to store them as efficient way as possible. For MyISAM tables you could use BIT(1) fields which get combined together for efficient storage: