2

Is it good practice to create an index on an embedded document? How does this relate to performance? Is there a noticeable real performance impact compared to a reference?

  • Do you have a sample? Did you run any tests? – Wernfried Domscheit Mar 24 '22 at 21:20
  • You can create an index on any type of field in your document - an embedded document or its individual fields are no exception. It depends upon your use case. MongoDB has array and sub-documents as composite types. – prasad_ Mar 25 '22 at 01:58

0 Answers0