Chapter 14 The InnoDB Storage Engine

Table of Contents

14.1 Introduction to InnoDB
14.1.1 InnoDB as the Default MySQL Storage Engine
14.1.2 Checking InnoDB Availability
14.1.3 Turning Off InnoDB
14.2 InnoDB Concepts and Architecture
14.2.1 MySQL and the ACID Model
14.2.2 The InnoDB Transaction Model and Locking
14.2.3 InnoDB Multi-Versioning
14.2.4 InnoDB Redo Log
14.2.5 InnoDB Undo Logs
14.2.6 InnoDB Table and Index Structures
14.2.7 InnoDB Mutex and Read/Write Lock Implementation
14.3 InnoDB Configuration
14.3.1 InnoDB Initialization and Startup Configuration
14.3.2 Configuring InnoDB for Read-Only Operation
14.3.3 InnoDB Buffer Pool Configuration
14.3.4 Configuring the Memory Allocator for InnoDB
14.3.5 Configuring InnoDB Change Buffering
14.3.6 Configuring Thread Concurrency for InnoDB
14.3.7 Configuring the Number of Background InnoDB I/O Threads
14.3.8 Configuring the InnoDB Master Thread I/O Rate
14.3.9 Configuring Spin Lock Polling
14.3.10 Configuring InnoDB Purge Scheduling
14.3.11 Configuring Optimizer Statistics for InnoDB
14.3.12 Configuring the Merge Threshold for Index Pages
14.4 InnoDB Tablespace Management
14.4.1 Resizing the InnoDB System Tablespace
14.4.2 Changing the Number or Size of InnoDB Redo Log Files
14.4.3 Using Raw Disk Partitions for the System Tablespace
14.4.4 InnoDB File-Per-Table Tablespaces
14.4.5 Creating a File-Per-Table Tablespace Outside the Data Directory
14.4.6 Copying File-Per-Table Tablespaces to Another Server
14.4.7 Storing InnoDB Undo Logs in Separate Tablespaces
14.5 InnoDB Table Management
14.5.1 Creating InnoDB Tables
14.5.2 Moving or Copying InnoDB Tables to Another Machine
14.5.3 Grouping DML Operations with Transactions
14.5.4 Converting Tables from MyISAM to InnoDB
14.5.5 AUTO_INCREMENT Handling in InnoDB
14.5.6 InnoDB and FOREIGN KEY Constraints
14.5.7 Limits on InnoDB Tables
14.6 InnoDB Table Compression
14.6.1 Overview of Table Compression
14.6.2 Enabling Compression for a Table
14.6.3 Tuning Compression for InnoDB Tables
14.6.4 Monitoring Compression at Runtime
14.6.5 How Compression Works for InnoDB Tables
14.6.6 Compression for OLTP Workloads
14.6.7 SQL Compression Syntax Warnings and Errors
14.7 InnoDB File-Format Management
14.7.1 Enabling File Formats
14.7.2 Verifying File Format Compatibility
14.7.3 Identifying the File Format in Use
14.7.4 Modifying the File Format
14.8 InnoDB Row Storage and Row Formats
14.8.1 Overview of InnoDB Row Storage
14.8.2 Specifying the Row Format for a Table
14.8.3 DYNAMIC and COMPRESSED Row Formats
14.8.4 COMPACT and REDUNDANT Row Formats
14.9 InnoDB Disk I/O and File Space Management
14.9.1 InnoDB Disk I/O
14.9.2 File Space Management
14.9.3 InnoDB Checkpoints
14.9.4 Defragmenting a Table
14.9.5 Reclaiming Disk Space with TRUNCATE TABLE
14.10 InnoDB and Online DDL
14.10.1 Overview of Online DDL
14.10.2 Performance and Concurrency Considerations for Online DDL
14.10.3 SQL Syntax for Online DDL
14.10.4 Combining or Separating DDL Statements
14.10.5 Examples of Online DDL
14.10.6 Implementation Details of Online DDL
14.10.7 How Crash Recovery Works with Online DDL
14.10.8 Online DDL for Partitioned InnoDB Tables
14.10.9 Limitations of Online DDL
14.11 InnoDB Startup Options and System Variables
14.12.1 InnoDB INFORMATION_SCHEMA Tables about Compression
14.12.2 InnoDB INFORMATION_SCHEMA Transaction and Locking Tables
14.12.3 InnoDB INFORMATION_SCHEMA System Tables
14.12.5 InnoDB INFORMATION_SCHEMA Buffer Pool Tables
14.12.6 InnoDB INFORMATION_SCHEMA Metrics Table
14.13 InnoDB Integration with MySQL Performance Schema
14.13.1 Monitoring InnoDB Mutex Waits Using Performance Schema
14.14 InnoDB Monitors
14.14.1 InnoDB Monitor Types
14.14.2 Enabling InnoDB Monitors
14.14.3 InnoDB Standard Monitor and Lock Monitor Output
14.14.4 InnoDB Tablespace Monitor Output
14.14.5 InnoDB Table Monitor Output
14.15 InnoDB Backup and Recovery
14.15.1 The InnoDB Recovery Process
14.16 InnoDB and MySQL Replication
14.17 InnoDB Integration with memcached
14.17.1 Benefits of the InnoDB / memcached Combination
14.17.2 Architecture of InnoDB and memcached Integration
14.17.3 Getting Started with the InnoDB memcached Plugin
14.17.4 Security Considerations for the InnoDB memcached Plugin
14.17.5 Writing Applications for the InnoDB memcached Interface
14.17.6 Using the InnoDB memcached Plugin with Replication
14.17.7 Internals of the InnoDB memcached Plugin
14.17.8 Troubleshooting the InnoDB memcached Plugin
14.18 InnoDB Troubleshooting
14.18.1 Troubleshooting InnoDB I/O Problems
14.18.2 Forcing InnoDB Recovery
14.18.3 Troubleshooting InnoDB Data Dictionary Operations
14.18.4 InnoDB Error Handling
14.18.5 InnoDB Error Codes