We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6cec96 commit 3b61a55Copy full SHA for 3b61a55
source/crud/delete.txt
@@ -51,6 +51,15 @@ To delete all documents from a collection, pass an empty
51
more information and examples, see
52
:method:`~db.collection.deleteMany()`.
53
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
63
Delete All Documents that Match a Condition
64
-------------------------------------------
65
0 commit comments