Questions tagged [innodb]

InnoDB is the main ACID-compliant Storage Engine used in MySQL.

InnoDB is the ACID-compliant Storage Engine used in MySQL. InnoDB also features the use for MVCC (Multiversion Concurrency Control) to support Transaction Isolation Levels for InnoDB. InnoDB is not a standalone database product. It has been distributed as a part of the MySQL database during its early years of InnoBase Oy as a partner with MySQL AB.

In the early days of MySQL, InnoDB was made available to MySQL as an additional transactional storage along with BDB. The company that developed InnoDB, InnoBase Oy, was purchased by Oracle in October 2005. Percona has contributed great improvements to its own Open Source version of InnoDB (XtraDB). Oracle, who eventually became the owner of MySQL via purchasing Sun, has incorporated most of those changes into InnoDB, as well adding improvements of their own. As a result, InnoDB has transformed into a more mature storage engine that handles mulitprocessing and multithreading more robustly. As of December 2010, InnoDB has become the default storage engine for MySQL 5.5.

MySQL 5.5 also has enhancements to facilitate InnoDB in engaging multiple CPUs. Those enhancements were introduced in MySQL 5.1.38 in the InnoDB Plugin only. Those enhancements have now been included with MySQL 5.5.

MySQL 5.5 also comes with new features such as Semisynchronous Replication, Multiple InnoDB Buffers Pools, plugins for user-defined authentication, performance metrics instrumentation, and more !!!

In a recent Oracle press release, one of the new features for MySQL 5.6 is to have InnoDB with FULLTEXT searching. This will be a major step forward for this storage engine as this was one of the most requested and sought after features.

The basic infrastructure of InnoDB centers around three major files

  • ibdata1
  • ib_logfile0
  • ib_logfile1

In conjunction with memory structures, ibdata1 processes info for 6 basic data structures

  • Table Data Pages
  • Table Index Pages
  • Table MetaData (List of Tablespave IDs + Misc Info)
  • MVCC Records
    • Rollback Segments
    • Undo Space
  • Double Write Buffer (Allows Background Page Writes)
  • Insert Buffer (For Collecting/Processing Changes to Secondary Indexes)

Configurations can accommodate

  • Separating Table Data and Index Pages
  • Storing ibdata1 in a Raw Disk Partition
  • Creating Multiple ibdata Files
  • Creating multiple Log Files
  • and more...

There is important cache known as the InnoDB Buffer Pool. As of MySQL 5.5, you can configure multiple buffer pool instances. Prior to MySQL 5.5, there is only one buffer pool instance.

384 questions
109
votes
1 answer

InnoDB: Error: log file ./ib_logfile0 is of different size

I just added the following lines in /etc/mysql/my.cnf after I converted one database to use InnoDB engine. innodb_buffer_pool_size = 2560M innodb_log_file_size = 256M innodb_log_buffer_size = 8M innodb_flush_log_at_trx_commit =…
jack
  • 1,705
  • 5
  • 21
  • 24
62
votes
6 answers

Unknown/unsupported storage engine: InnoDB | MySQL Ubuntu

I recently upgraded from the previous LTS Ubuntu to Precise and now mysql refuses to start. It complains of the following when I attempt to start it: ╰$ sudo service mysql restart stop: Unknown instance: start: Job failed to start And this shows in…
Garrett
  • 753
  • 1
  • 6
  • 8
37
votes
6 answers

MySQL InnoDB - innodb_file_per_table cons?

By default MySQL InnoDB stores all tables of all DBs in one global file. You can change this by setting innodb_file_per_table in the config, which then creates one data file for each table. I am wondering why innodb_file_per_table is not enabled by…
UpTheCreek
  • 1,598
  • 10
  • 31
  • 45
25
votes
3 answers

Mysql crashed and won't start up

Our production mysql server just crashed and won't come back up. It's giving a segfault error. I tried a reboot, and just don't know what else to try. Here is the stacktrace: 140502 14:13:05 [Note] Plugin 'FEDERATED' is disabled. InnoDB: Log scan…
tilleryj
  • 353
  • 1
  • 3
  • 6
20
votes
2 answers

Best MySQL cache settings for 8gb RAM dedicated MySQL server using only InnoDB (5gb database)

I'm a pretty big noob when it comes to setting up MySQL for performance. And honestly I'm not worried about the fine tuning to squeeze every last bit of performance out of MySQL, but I do know that the most important thing to do that provides some…
billmalarky
  • 303
  • 1
  • 2
  • 4
19
votes
5 answers

Modifying columns of very large mysql tables with little or no downtime

I periodically need to make changes to tables in mysql 5.1, mostly adding columns. Very simple with the alter table command. But my tables have up to 40 million rows now and they are growing fast... So those alter table commands take several…
apptree
  • 345
  • 1
  • 3
  • 10
18
votes
6 answers

Backing up a MySQL database via ZFS snapshots

I've found a number of sites talking about doing exactly this, but I'm missing a few important details. The general steps are Run FLUSH TABLES WITH READ LOCK Take the ZFS snapshot Run UNLOCK TABLES Various sources report that InnoDB, which I'm…
Andy Shulman
  • 283
  • 3
  • 7
17
votes
5 answers

What is the difference between InnoDB and MyISAM?

I am using MySQL as my database for my current web project. I am new to MySQL. Please explain to me the difference between InnoDB and MyISAM.
user16614
16
votes
5 answers

How do you choose a MySQL database engine

In particular, how do you choose between MyISAM and InnoDB, when neither is missing a required feature (e.g. you don't need foreign keys). Does it always come down to trying both and measuring? Or are there good rules of thumb regarding the number…
Tony Meyer
  • 889
  • 1
  • 13
  • 25
16
votes
6 answers

How to improve MySQL INSERT and UPDATE performance?

This question can probably be asked on StackOverflow as well, but I'll try here first... Performance of INSERT and UPDATE statements in our database seems to be degrading and causing poor performance in our web app. Tables are InnoDB and the…
mmattax
  • 1,284
  • 7
  • 19
  • 30
15
votes
4 answers

How to know storage engine used of a database?

Previously, on every database created, I use: mysql -u root -p CREATE DATABASE dbname CHARACTER SET utf8 COLLATE utf8_bin; GRANT ALL ON dbname.* TO 'dbuser'@'localhost'; and then use the database without thinking about MyISAM or InnoDB How to know…
cewebugil
  • 705
  • 3
  • 8
  • 12
13
votes
4 answers

Simpler way to convert all tables from InnoDB to MyISAM

Previously, I use this: USE dbname; ALTER TABLE tablename ENGINE=MYISAM; I'm looking for simpler way to convert all tables in a database, rather than writing every table name one by one
cewebugil
  • 705
  • 3
  • 8
  • 12
13
votes
7 answers

Setting a time limit for a transaction in MySQL/InnoDB

This sprang from this related question, where I wanted to know how to force two transactions to occur sequentially in a trivial case (where both are operating on only a single row). I got an answer—use SELECT ... FOR UPDATE as the first line of both…
Trevor Burnham
  • 364
  • 2
  • 3
  • 15
13
votes
1 answer

How to disable keys in MySQL InnoDB tables?

Is it possible to disable keys in InnoDB tables? If yes, how? If not, why?
user12145
  • 1,075
  • 6
  • 26
  • 47
12
votes
4 answers

Increase InnoDB buffer pool size

I am having difficulty setting the buffer pool size and log file size for MySql InnoDB. I am far from a MySql expert but have been reading around and it seems that to change this I just add these lines to my /etc/mysql/my.cnf # Set buffer pool size…
tgrosinger
  • 231
  • 1
  • 2
  • 7
1
2 3
25 26