Skip to content

Commit 3b61a55

Browse files
authored
DOCSP-43957-recommend-drop-and-recreate (#358)
* DOCSP-43957-recommend-drop-and-recreate * DOCSP-43957-recommend-drop-and-recreate * DOCSP-43957 Jeff comments * DOCSP-43957 Jeff comments 2 * DOCSP-43957 tech edits
1 parent d6cec96 commit 3b61a55

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

source/crud/delete.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,15 @@ To delete all documents from a collection, pass an empty
5151
more information and examples, see
5252
:method:`~db.collection.deleteMany()`.
5353

54+
.. note::
55+
56+
If you want to delete all documents from a large collection, dropping
57+
with the :method:`db.collection.drop` method. and recreating the
58+
collection may have faster performance than deleting documents with
59+
the :method:`db.collection.deleteMany()` method. When you recreate
60+
the collection, you must also recreate any specified collection
61+
parameters such as collection indexes.
62+
5463
Delete All Documents that Match a Condition
5564
-------------------------------------------
5665

0 commit comments

Comments
 (0)