Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

如题,有一个collection中,有20个字段,可能有15 6个要参与查询,像时间戳类的还要排序。
请问这种问题需要怎么设计,前期-中期-后期。


题外话,之前有玩网络游戏的交易平台,那种查询和筛选感觉有几十个条件,他们又是如何做的呢?


感谢前辈帮助


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
3.7k views
Welcome To Ask or Share your Answers For Others

1 Answer

就一字排开,这种又不会造成什么性能问题。索引是分先后的,规定好索引,然后前段查询的顺序注意一下就好了。

最烦的是需要跨多个表查询,mongo本身又不适合这种。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...