In MariaDB, a table can be split in smaller subsets. Both data and indexes are partitioned.
There can be several reasons to use this feature:
Some MariaDB storage engines allow more interesting uses for partitioning.
SPIDER allows one to:
CONNECT allows one to:
See also: Using CONNECT - Partitioning and Sharding
When partitioning a table, the use should decide:
A partitioning type is the method used by MariaDB to decide how rows are distributed over existing partitions. Choosing the proper partitioning type is important to distribute rows over partitions in an efficient way.
With some partitioning types, a partitioning expression is also required. A partitioning function is an SQL expression returning an integer or temporal value, used to determine which row will contain a given row. The partitioning expression is used for all reads and writes on involving the partitioned table, thus it should be fast.
See Partioning Types for a detailed description.
By default, MariaDB permits partitioning. You can determine this by using the SHOW PLUGINS statement, for example:
SHOW PLUGINS; ... | Aria | ACTIVE | STORAGE ENGINE | NULL | GPL | | FEEDBACK | DISABLED | INFORMATION SCHEMA | NULL | GPL | | partition | ACTIVE | STORAGE ENGINE | NULL | GPL | +-------------------------------+----------+--------------------+---------+---------+
If partition is listed as DISABLED:
| partition | DISABLED | STORAGE ENGINE | NULL | GPL | +-------------------------------+----------+--------------------+---------+---------+
MariaDB has either been built without partitioning support, or has been started with the the --skip-partition option, or one of its variants:
--skip-partition --disable-partition --partition=OFF
and you will not be able to create partitions.
It is possible to create a new partitioned table using CREATE TABLE.
ALTER TABLE allows one to:
The INFORMATION_SCHEMA.PARTITIONS table contains information about existing partitions.
© 2019 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/partitioning-overview/