mongodb-d4 icon indicating copy to clipboard operation
mongodb-d4 copied to clipboard

Selection of range sharding against hash sharding

Open fangjian601 opened this issue 10 years ago • 0 comments
trafficstars

MongoDB now supports hash shard keys. In some cases, hash sharding has better performance than range sharding(e.g. most queries' predicates are equality). So D4 should implement the selection of range sharding against hash sharding.

In order to do this, we need to add a field to src/search/design.py, which indicates what sharding strategy that design is using.

Then in the cost model, we need to adapt to different sharding strategy. So method computeTouchedNode in src/costmodel/nodeestimator.py should be adapted to these changes.

fangjian601 avatar Dec 16 '14 02:12 fangjian601