educative.io

Educative

Sharding related question

Sharding based on Tweet creation time: Storing tweets based on creation time will give us the advantage of fetching all the top tweets quickly and we only have to query a very small set of servers.

i am not able to understand how will the sharding based on Tweet creation time help fetch top tweets quickly. My confusion is- is this approach also using hashing function on the tweet creation time like the previous two approaches? if yes then the hash function outcome will randomly pick the shards and write to them. OR is the author meaning to say that the approach involves writing all tweets generated in a specific time window to be written in one shard only? that way there is locality of processing achieved.