It is possible to configure the data nodes in a MySQL Cluster to store most of their data on disk rather than in RAM. This can be useful where the amount of data to be stored is impossible to store in RAM (for example, due to financial constraints). However, disk-based tables clearly have significantly reduced performance as compared to memory tables.
Note
Disk-based tables still store columns with indexes in RAM. Only columns without indexes are stored on disk. This can result in a large RAM requirement even for disk-based tables.
To configure disk-based tables, data nodes should have spare space on a high performance block device.
To configure disk-based tables, we must configure each data node with a set of two files as follows:
TABLESPACES
—disk-based tables store their data inTABLESPACES
, which are made up of one or more data filesLogfile
groups—disk-based tables store their ndb data in a logfile group made up of one or more undo logfiles