Aria Storage Engine
Additionally, internal on-disk tables are in the Aria table format instead of the MyISAM table format. This should speed up some GROUP BY and DISTINCT queries because Aria has better caching than MyISAM.
TRANSACTIONAL= 0: If the
TRANSACTIONALtable option is set for an Aria table, then the table will be crash-safe. This is implemented by logging any changes to the table to Aria's transaction log, and syncing those writes at the end of the statement. This will marginally slow down writes and updates. However, the benefit is that if the server dies before the statement ends, all non-durable changes will roll back to the state at the beginning of the statement. This also needs up to 6 bytes more for each row and key to store the transaction id (to allow concurrent insert's and selects).
TRANSACTIONAL=1is not supported for partitioned tables.
- An Aria table's default value for the
TRANSACTIONALtable option depends on the table's value for the
ROW_FORMATtable option. See below for more details.
- If the
TRANSACTIONALtable option is set for an Aria table, the table does not actually support transactions. See MDEV-21364 for more information. In this context, transactional just means crash-safe.
PAGE_CHECKSUM= 0: If index and data should use page checksums for extra safety.
TABLE_CHECKSUM= 0: Same as
CHECKSUMin MySQL 5.1
ROW_FORMAT=PAGE: The table's row format.
- The default value is
- To emulate MyISAM, set
- The default value is
ROW_FORMAT table options interact as follows:
TRANSACTIONAL=1is set, then the only supported row format is
ROW_FORMATis set to some other value, then Aria issues a warning, but still forces the row format to be
TRANSACTIONAL=0is set, then the table will be not be crash-safe, and any row format is supported.
TRANSACTIONALis not set to any value, then any row format is supported. If
ROW_FORMATis set, then the table will use that row format. Otherwise, the table will use the default
PAGErow format. In this case, if the table uses the
PAGErow format, then it will be crash-safe. If it uses some other row format, then it will not be crash-safe.
Some other improvements are:
CHECKSUM TABLEnow ignores values in NULL fields. This makes
CHECKSUM TABLEfaster and fixes some cases where same table definition could give different checksum values depending on row format. The disadvantage is that the value is now different compared to other MySQL installations. The new checksum calculation is fixed for all table engines that uses the default way to calculate and MyISAM which does the calculation internally. Note: Old MyISAM tables with internal checksum will return the same checksum as before. To fix them to calculate according to new rules you have to do an
ALTER TABLE. You can use the old ways to calculate checksums by using the option
--oldto mysqld or set the system variable '
1when you do
CHECKSUM TABLE ... EXTENDED;
- At startup Aria will check the Aria logs and automatically recover the tables from the last checkpoint if mysqld was not taken down correctly.
mysqld Startup Options for Aria
For a full list, see Aria System Variables.
In normal operations, the only variables you have to consider are:
- This is where all index and data pages are cached. The bigger this is, the faster Aria will work.
- The default value 8192, should be ok for most cases. The only problem with a higher value is that it takes longer to find a packed key in the block as one has to search roughly 8192/2 to find each key. We plan to fix this by adding a dictionary at the end of the page to be able to do a binary search within the block before starting a scan. Until this is done and key lookups takes too long time even if you are not hitting disk, then you should consider making this smaller.
- Possible values to try are
- Note that you can't change this without dumping, deleting old tables and deleting all log files and then restoring your Aria tables. (This is the only option that requires a dump and load)
- Set this to "
at_flush" if you want to keep a copy of the transaction logs (good as an extra backup). The logs will stay around until you execute FLUSH ENGINE LOGS.
- Set this to "