문제

I am a newbie on mongoDB. I have been reading about sharding and sharing keys and I do not find a way to configure it the way I want. I have large - about 5-6 GB - binary files -e.g. float matrix- which I want to distribute over a cluster using GridFS. The point is I want the chunks to be contiguous so when my script asks for a certain portion of the matrix, it does not have to bring them from other shard, so I get Query Isolation.

How can I set up the sharding key to accomplish this?

도움이 되었습니까?

해결책

I figured out.

Using files_id as sharding key yields to contiguous chunks in each replica set which is perfect for query isolation.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top