Search This Blog

Monday, June 20, 2011

Mysql - InnoDB - File Per Table

The data files that you define in the configuration file form the InnoDBsystem tablespace. The files are logically concatenated to form the tablespace. There is no striping in use. Currently, you cannot define where within the tablespace your tables are allocated. However, in a newly created tablespace, InnoDB allocates space starting from the first data file.
To avoid the issues that come with storing all tables and indexes inside the system tablespace, you can turn on the innodb_file_per_tableconfiguration option, which stores each newly created table in a separate tablespace file (with extension .ibd). For tables stored this way, there is less fragmentation within the disk file, and when the table is truncated, the space is returned to the operating system rather than still being reserved by InnoDB within the system tablespace.

No comments:

Post a Comment