-
Notifications
You must be signed in to change notification settings - Fork 3
3.0 Indexing
this page will be about indexing

Indexes improve query execution by storing a portion of the collection in a small collection that can be searched quickly, and saves query execution time by avoiding collection scan where all records in the collection are scanned.
The process of building indices heavily impacts the database and prevents read and write operations. To avoid this impact index construction can be run in the background.
Indexes can be created in embedded fields as well as embedded documents. An index on an embedded field can be created using a dot notation on a top level field and will support queries that search embedded document fields.
db.<abstract_collection>.createIndex( { "product.version":1 } )
GS1 Canada® is a registered trademark of GS1 Canada. Copyright © GS1 Canada 2018.