0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

db.collection.count()は非推奨

Last updated at Posted at 2024-01-29

下記クエリのうち、db.collection.find().count();の結果が異なる事がある。
MongoDBのバージョン3.2以降では、db.collection.count()は非推奨

db.collection.find().count();

db.collection.count();

db.collection.countDocuments();

db.collection.aggregate([{ $group: { _id: null, count: { $sum: 1 } } }]);
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?