Add a general tablespace
MySQLStorageCommand
CREATE TABLESPACE ssd_ts ADD DATAFILE 'ssd_ts.ibd' ENGINE=InnoDB;What it does
Creates an InnoDB general tablespace that multiple tables can share.
When to use it
To group tables in a specific file/disk, or to reduce the number of files.
Caution
If the DATAFILE path is relative, it is created under datadir; placing it on a different disk requires an absolute path and the necessary permissions. To move a table here: ALTER TABLE customer TABLESPACE ssd_ts; A tablespace can be dropped only when it is empty.