educative.io

How do we read data from round robin partitioning?

Round-robin partitioning: This is a very simple strategy that ensures uniform data distribution. With ‘n’ partitions, the ‘i’ tuple is assigned to partition (i mod n).

Here, can anyone explain to me how the read operation works?

Hi @Chandansingh_Rajput,
Round-robin partitioning gives the advantage of uniform data distribution. But, this approach has a downside when we have to read those records which are uniformly divided among all disks. It is hard to answer point and range queries because of random distribution. e.g., Consider this query;
SELECT * FROM Employee WHERE EmployeeName = ‘John doe’; (This is a point query)

For this query, we cannot identify the exact disk where the records with the specified values would be stored. Hence, we need a full scan of all the disks to answer this query.
Similarly, in the case of range queries, when we have to find the number of employees with a range of salaries, we would have to scan all partitions.