Meteor Database Performance

meteor
meteor-database

How can we cause MongoDB to use index?

Posts._ensureIndex({userId: 1});

This creates an index on the userId field in the Posts collection. You can also create indexes in MongoDB itself.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License