This is a read-only copy of the MariaDB Knowledgebase generated on 2025-05-01. For the latest, interactive version please visit https://mariadb.com/kb/.

InnoDB Storage Engine Introduction

Overview

MariaDB Enterprise Server uses the InnoDB storage engine by default. InnoDB is a general purpose transactional storage engine that is performant, ACID-compliant, and well-suited for most workloads.

Benefits

The InnoDB storage engine:

  • Is available with all versions of MariaDB Enterprise Server and MariaDB Community Server.
  • Is a general purpose storage engine.
  • Is transactional and well-suited for online transactional processing (OLTP) workloads.
  • Is ACID-compliant.
  • Performs well for mixed read-write workloads.
  • Supports online DDL.

Feature Summary

FeatureDetailResources
Storage EngineInnoDB
AvailabilityAll ES and CS versionsMariaDB Enterprise Server
Workload OptimizationTransactional
Table OrientationRow
Default Row FormatDynamic
InnoDB Row Formats
InnoDB Dynamic Row Format
ACID-compliantYes
XA TransactionsYes
Primary KeysYesInnoDB Primary Keys
Auto-IncrementYesInnoDB AUTO_INCREMENT Columns
SequencesYesInnoDB Sequences
Foreign KeysYesInnoDB Foreign Keys
IndexesYesInnoDB Indexes
Secondary IndexesYesInnoDB Secondary Indexes
Unique IndexesYesInnoDB Unique Indexes
Full-text SearchYesInnoDB Full-text Indexes
Spatial IndexesYesInnoDB Spatial Indexes
CompressionYesConfigure InnoDB Page Compression
Data-at-Rest EncryptionYes
High Availability (HA)YesMariaDB Replication
Galera Cluster
Main Memory CachingYesInnoDB Buffer Pool
Transaction LoggingYesInnoDB Redo Log (Crash Safety)
InnoDB Undo Log (MVCC)
Garbage CollectionYesInnoDB Purge Threads
Online Schema changesYesInnoDB Schema Changes
Non-locking ReadsYes
Row LockingYes

Examples

Creating an InnoDB Table

CREATE DATABASE hq_sales;
CREATE TABLE hq_sales.invoices (
   invoice_id BIGINT UNSIGNED AUTO_INCREMENT NOT NULL,
   branch_id INT NOT NULL,
   customer_id INT,
   invoice_date DATETIME(6),
   invoice_total DECIMAL(13, 2),
   payment_method ENUM('NONE', 'CASH', 'WIRE_TRANSFER', 'CREDIT_CARD', 'GIFT_CARD'),
   PRIMARY KEY(invoice_id)
) ENGINE = InnoDB;
SELECT TABLE_SCHEMA, TABLE_NAME, ENGINE
FROM information_schema.TABLES
WHERE TABLE_SCHEMA='hq_sales'
AND TABLE_NAME='invoices';
+--------------+------------+--------+
| TABLE_SCHEMA | TABLE_NAME | ENGINE |
+--------------+------------+--------+
| hq_sales     | invoices   | InnoDB |
+--------------+------------+--------+

Resources

Architecture

Operations

MariaDB Knowledge Base

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.