g8287694
V2EX  ›  问与答

关于 mongodb, 千万数据 ,有办法查询到不连续的数据吗?

  •  
  •   g8287694 · Aug 13, 2018 · 1500 views
    This topic created in 2922 days ago, the information mentioned may be changed or developed.

    需要把别的地方的数据转移的到 mongodb,现在知道数据内部有一个唯一索引(数字 连续),根据接口只能一条一条的往下扒,然后插入,但是因为是多线程跑的,还有超时,接口返回不了等问题,现在想知道有哪些数据会丢失(在插入的时候已经做了记录),求各位大佬有什么语句可以查询吗?

    1 replies    2018-08-13 22:40:33 +08:00
    wsc449
        1
    wsc449  
       Aug 13, 2018
    没有一条语句可以搞定的,可以循环获取 1 千万数据,不会超过 1 小时,然后程序中用自增 ID 做对比
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   968 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 19:30 · PVG 03:30 · LAX 12:30 · JFK 15:30
    ♥ Do have faith in what you're doing.