Skip to content

DOCS-2736 parallelCollectionScan command #1675

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions source/includes/ref-toc-command-crud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,8 @@ description: "Resets the last error status."
name: ":dbcommand:`eval`"
file: /reference/command/eval
description: "Runs a JavaScript function on the database server."
---
name: ":dbcommand:`parallelCollectionScan`"
file: /reference/command/parallelCollectionScan
description: "Lets applications use multiple parallel cursors when reading documents from a collection."
...
24 changes: 24 additions & 0 deletions source/reference/command/parallelCollectionScan-field.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
object:
name: parallelCollectionScan
type: dbcommand
field:
optional: false
type: field
name: parallelCollectionScan
type: string
position: 1
description: |
The name of the collection.
---
object:
name: parallelCollectionScan
type: dbcommand
field:
optional: false
type: field
name: numCursors
type: integer
position: 1
description: |
The number of cursors, not to exceed 1,000.
...
28 changes: 28 additions & 0 deletions source/reference/command/parallelCollectionScan.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
======================
parallelCollectionScan
======================

.. default-domain:: mongodb

.. dbcommand:: parallelCollectionScan

.. versionadded:: 2.6

Lets applications use multiple parallel cursors when reading all the
documents in a collection. The :dbcommand:`parallelCollectionScan`
command returns an array of cursors for MongoDB to use in iterating the
collection, bringing increased throughput.

The command has following syntax:

.. code-block:: javascript

{
parallelCollectionScan: "<collection>",
numCursors: <integer>
}

The :dbcommand:`parallelCollectionScan` command takes the following
fields:

.. include:: /reference/command/parallelCollectionScan-field.rst