When to index, what to index in Mongoid?

非 Y 不嫁゛ 提交于 2019-12-07 06:41:33

问题


I'm a bit new to indexes, but I am curious about the usecases for an index. (I assume it makes queries on the indexed fields much faster.) Is there a criteria for determining what to index and when to index? What kind of performance benefits should I expect -- specifically using Mongoid with MongoDb on a Rails app?


回答1:


Check out Indexes MongoDB docs and Indexing Advice and FAQ, lots of great info here.



来源:https://stackoverflow.com/questions/6183945/when-to-index-what-to-index-in-mongoid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!