V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
jackOff
V2EX  ›  数据库

有个小问题暂时没有找到比较快速的解决方案

  •  
  •   jackOff · Aug 18, 2024 · 2028 views
    This topic created in 630 days ago, the information mentioned may be changed or developed.

    我手上有 70 亿字符串数据,我需要把它灌入 map 里,主键是自增数字 id,这个 map 需要被用来根据主键查值和根据值查主键,有什么高效的办法解决吗?正反查询实际时间需要限制在 5 秒内

    5 replies    2024-08-19 11:47:11 +08:00
    iintothewind
        1
    iintothewind  
       Aug 18, 2024
    非得是 map 吗? 查询很好解决啊? es ,click house 都可以啊,设置好索引就成
    jackOff
        2
    jackOff  
    OP
       Aug 18, 2024
    @iintothewind 有道理,我试试看
    jackOff
        3
    jackOff  
    OP
       Aug 18, 2024
    @iintothewind 做题做傻了反倒是忘记了这些工具的实际应用
    iseki
        4
    iseki  
       Aug 18, 2024 via Android
    不想用这些独立设施,也可以怼个嵌入式数据库凑合用,5s 可以说太容易做到了
    yinft
        5
    yinft  
       Aug 19, 2024
    BiMap?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2504 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 00:30 · PVG 08:30 · LAX 17:30 · JFK 20:30
    ♥ Do have faith in what you're doing.