Range-based partitioning

Range-based partitioning maps the data to different partitions based on ranges of values of the partitioning key that you establish for each partition. It is the most common type of partitioning and is often used with dates. For example, for a table that has a date column set as the partitioning key, the January-2005 partition would contain rows with partitioning key values from 01-Jan-2005 to 31-Jan-2005.

Here is the diagrammatic representation of a range-based partition:

As you can see, in range-based partitioning, the overall data is divided into chunks and the lower and upper bound is usually defined based on the total number of records or some other factor.

Range-based partitioning supports more efficient range queries. Given a range query on the shard key, the query router can easily determine which chunks overlap that range and route the query to only those shards that contain these chunks. However, range-based partitioning can result in an uneven distribution of data, which may negate some of the benefits of partitioning. That's where the hash-based partitioning strategy might come in handy.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.59.210