Designing a partition strategy for analytical workloads
There are three main types of partition strategies for analytical workloads. These are listed here:
- Horizontal partitioning, which is also known as sharding
- Vertical partitioning
- Functional partitioning
Let's explore each of them in detail.
Horizontal partitioning
In a horizontal partition, we divide the table data horizontally, and subsets of rows are stored in different data stores. Each of these subsets of rows (with the same schema as the parent table) are called shards. Essentially, each of these shards is stored in different database instances.
You can see an example of a horizontal partition here:
In the preceding example, you can see that the data in the top table is distributed horizontally based on the Trip ID range.
Selecting the right shard key
It is very important we select the right shard key...