Home > MySQL and databases > What is innoDB - enabling it.

What is innoDB - enabling it.

October 6th, 2009

nnoDB.

innoDB is a table type in mySQL.

InnoDB provides MySQL with a transaction-safe storage engine with commit, rollback, and crash recovery capabilities. InnoDB does locking on the row. These features increase multi-user concurrency and performance. There is no need for lock escalation in InnoDB because row-level locks in InnoDB fit in very little space.

advantages of innoDB table type are :

* InnoDB tables are transactional: they provide rollback and commit capabilities.
* InnoDB is the only table type in MySQL which supports foreign key constraints.
* InnoDB tables are fast, even faster than MyISAM tables in many simple benchmarks. See the benchmark page.
* InnoDB tables have row level locking: they allow higher concurrency than MyISAM tables which use table level locking, or BDB tables, which use page level locking. High concurrency is reflected in high multiuser performance.
* InnoDB tables provide an Oracle-style consistent read, also known as multiversioned concurrency control. SELECTs do not need to set any locks and need not interfere with inserts and updates to the same table. No other MySQL table type has this property.
* There is a true hot backup tool available for InnoDB, which allows you to make backups of a running database in background, without setting any locks or disturbing database operation.
* Multiversioning also allows you to dump tables from your database with SELECT INTO OUTFILE without setting locks on the tables: the database can keep working while a backup is made.
* InnoDB tables have automatic crash recovery. You do not need to repair your tables if the operating system or the database server crashes, when there is no disk image corruption.
* InnoDB tables can be any size, also on those operating systems where file size is restricted to < 2 GB.

Enabling and Checking innoDB type in mySQL

innoDB type is supported my all mySQL versions starting from mySQL 4.0.x

Go to the file /etc/my.cnf file and either comment out the line or delete the line ’skip-innodb’ and innodb will be enabled.

You can check either your mySQL supports the innoDB type by giving the following command at mysql prompt.

mysql> show variables like ‘have_innodb’;
+—————+——-+
| Variable_name | Value |
+—————+——-+
| have_innodb | YES |
+—————+——-+
1 row in set (0.00 sec)

MySQL and databases

  1. No comments yet.
  1. No trackbacks yet.