jjzjj

blogname

全部标签

MongoDB "filtered"索引 : is it possible?

“仅当”要索引的字段之一具有特定值时,是否可以索引集合中的某些文档?让我用一个例子来解释:集合“posts”有数百万个文档,ALL定义如下:{   "network":"network_1",   "blogname":"blogname_1",   "post_id":1234,   "post_slug":"abcdefg"}Let'sassumethatthedistributionofthepostisequallysplitonnetwork_1andnetwork_2MyapplicationOFTENselectthetypeofquerybasedonthevalueo