How Dynamic Partition Table Data Grows Up
Traditional Enterprise Relational Database has Partitioning function. It has partitioning information in the schema metadata. Alinous Elastic DB also have it.
And it is designed for Dynamic Table Partition on the distributed remote nodes.
Generally, Relational Databases set partition information on creating schema. Actually most of them use CREATE TABLE Statement to set it.
But in this way, it is hard to update the partition keys.
Therefore, Alinous Elastic DB has the data in the remote storage node.
The transaction monitor node, which is central manager node, aggregates remote schema information, and sent it to Table Region Manager Node.
We can both change partition key, and add partition any time.
When you try to change the partition key, you should request to do that, to the remote node. Then it starts rebuilding partition structure automatically.
It is online process, therefore you do not have to stop the database.
This database supports Two Layer Partitioning. We can also change the partition structure freely.
When we use Two Layer Partition, the top partition key's values is grouped. Therefore we have to request to change the grouped value to the central Transaction Monitor, in order to change it.
When you use single partition key, you can add storage node, any time, any where.
At first, the CREATE TABLE SQL statement makes a storage node with infinity value in Table Partition Key.
After that, when the data increases, you can insert storage node with smaller partition key values in it.
The Ainous Elastic DB can have tow layer table partitioning function, which uses partition key and sub partition key.
The logical structure of the two layer partitioning is below.
It makes tree structure whose depth is 1 or 2.
In actual use, the infinity node on the top level has hot data, which is recently created and accessed frequently. And other node on the first level is old data, which is big, but is not accessed frequently.
The logical structure is represented by following physical remote storage node structure.
In this case, storage node has 2 keys, these are partition key and sub partition key. When created table at first, then there is a storage node both values are infinity.
Adding a node is done by making a single storage node.
In this way, you can add storage anywhere. The tree structure does not have to be symmetric.
Therefore, you can add storage node to help busy node, and you do not have to help not busy ones.