V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐工具
RoboMongo
推荐书目
50 Tips and Tricks for MongoDB Developers
Related Blogs
Snail in a Turtleneck
iamtuzi3333
V2EX  ›  MongoDB

大佬们,急需请教,遇到大困难

  •  1
     
  •   iamtuzi3333 · May 28, 2025 · 3169 views
    This topic created in 339 days ago, the information mentioned may be changed or developed.
    小弟现在有一个 Mongo 数据库,存了几十个集合表,每个集合每秒都插入一个 json 数据,json 数据中有一个浮点数数组,50 个元素,还有一个字段时间戳,int 类型,unix 时间值,然后给这个时间字段建立了升序索引,但是现在发现根据这个字段来查询历史时间的数据效率很慢,就是查询某一个范围,查询 4 月份的数据用了 60 多秒,是这个索引效果不好还是啥原因,有大佬指点下么,想查询数据快点。求求求!!!
    3 replies    2025-05-29 16:41:28 +08:00
    guisheng
        1
    guisheng  
       May 28, 2025
    去问 AI
    lrh3321
        2
    lrh3321  
       May 28, 2025
    MongoDB 在 5.0 中支持了新的 timeseries collection 类型
    iamtuzi3333
        3
    iamtuzi3333  
    OP
       May 29, 2025
    @lrh3321 我看看,谢谢!
    @guisheng 好主意
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2457 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 09:33 · PVG 17:33 · LAX 02:33 · JFK 05:33
    ♥ Do have faith in what you're doing.