OPTIONS

sh.splitFind()

On this page

Definition

sh.splitFind(namespace, query)

Splits the chunk that contains the shard key value specified by the query at the chunk’s median point. sh.splitFind() creates two roughly equal chunks. To split a chunk at a specific point instead, see sh.splitAt().

The method takes the following arguments:

Parameter Type Description
namespace string The namespace (i.e. <database>.<collection>) of the sharded collection that contains the chunk to split.
query document A query document that specifies the shard key value that determines the chunk to split.

Consideration

In most circumstances, you should leave chunk splitting to the automated processes within MongoDB. However, when initially deploying a sharded cluster, it may be beneficial to pre-split manually an empty collection using methods such as sh.splitFind().

Was this page helpful?

Yes No

Thank you for your feedback!

We're sorry! You can Report a Problem to help us improve this page.