node.js - Why would someone create an index on a collection in MongoDB? -


db.collection.createindex()¶ 

creates indexes on collections.

i understand why need indexes on documents, why on collections?

thanks helping!

we not creating indexes on documents, index documents on collections, selecting 1 or more keys. index columns in tables on relational db world.

just find right document (row) collection (table).


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -