Aria 存储引擎是默认被编译进MariaDB 5.1里的,并且在mysqld启动的时候就要求同时启动.
DISTINCT请求速度更快,因为Aria有比MyISAM更好的缓冲机制.包含Aria是MariaDB 5.1和MySQL 5.1之间的一个不同.
There are also some new options to
TRANSACTIONAL= 0: Transactional means crash-safe for Aria
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 new cacheable row format for Aria tables. Default row format for Aria tables and only row format that can be used if
TRANSACTIONAL=1. To emulate MyISAM, use
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 last checkpoint if mysqld was not taken down correctly.
mysqld startup options for Aria
|Enable or disable Aria plugin. Possible values are |
|Block size to be used for Aria index pages.||8192|
|Interval between automatic checkpoints, in seconds; |
|Number of consecutive log recovery failures after which logs will be automatically deleted to cure the problem; |
|Specifies Aria group commit mode. Possible values are "|
|Interval between commits in microseconds (|
|Path to the directory where to store transactional log||Same as '|
|Limit for transaction log size|
|Specifies how Aria transactional log will be purged. Possible values of name are "|
|Don't use the fast sort index method to created index if the temporary file would get bigger than this.|
|Maintain page checksums (can be overridden per table with |
|This characterizes the number of hits a hot block has to be untouched until it is considered aged enough to be downgraded to a warm block. This specifies the percentage ratio of that number of hits to the total number of blocks in the page cache.|
|The size of the buffer used for index blocks for Aria tables. Increase this to get better index handling (for all reads and multiple writes) to as much as you can afford.|
|The minimum percentage of warm blocks in key cache|
|Specifies how corrupted tables should be automatically repaired. Possible values are "|
|Number of threads to use when repairing Aria tables. The value of 1 disables parallel repair.|
|The buffer that is allocated when sorting the index when doing a |
|Specifies how Aria index statistics collection code should treat |
|Controls syncing directory after log file growth and new file creation. Possible values are "|
In normal operations, the only variables you have to consider are:
- This is where all data and index are cached. The bigger this is, the faster Aria will work.
- The default value 8192, should be ok for most cases. The only with a higher value is that it takes long 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
- Set this to "
See also: Aria FAQ