0

Setup:

  1. I'm doing local desktop development, trying out MongoDB Compass query within Documents' tab.
  2. Created an index on a field, and querying WITHOUT the index field increments the '_id' index usage, this is fine. With every query WITH the index field, my custom index usage increment by 1, this is fine.

Problem Statement:

  1. However few days down the development, I noticed every query WITH the index field, now increments the index usage by 2.

Troubleshooting tried:

  1. Disconnect and reconnect mongoDB still persist.
  2. Changes made recently was added db collection due to Session. Suspect: does multiple collection causes this?

Alternative: Or it actually does not matter even the index usage increments by 2 for every query ran?

EugeneO
  • 1
  • 1
  • You may want add some more details to your post - the document structure, the indexes and the queries you are running. – prasad_ May 20 '20 at 09:27

1 Answers1

0

When you click refresh, it sends the query to the backend, which may use the index. You can verify this by turning on the level 2 profiling log in MongoDB and see.

Peng
  • 21
  • 1
  • 4