小编Raj*_*jan的帖子

字段类型在MongoDB索引中是否重要?

以下是MongoDB中文档结构的两个示例.

{  
 UserId: "123",  
 UserName: "Usain Bolt"  
}



{  
 UserId: NumberLong(123),  
 UserName: "Usain Bolt"  
}
Run Code Online (Sandbox Code Playgroud)

如果我要创建索引UserID,上述两个示例之间的查找性能是否存在差异?

indexing performance types field mongodb

15
推荐指数
1
解决办法
6022
查看次数

标签 统计

field ×1

indexing ×1

mongodb ×1

performance ×1

types ×1