Graves's recent timeline updates
Graves

Graves

V2EX member #317811, joined on 2018-05-22 12:39:13 +08:00
  •   You need to sign in to view this topic
    Per Graves's settings, the topics list is hidden
    Deals info, including closed deals, is not hidden
    Graves's recent replies
    Feb 25, 2022
    Replied to a topic by Graves Java shardingjdbc 根据 id 查询扫了所有分表
    @ChovyChu @cheng6563 测试了一下,加了 limit1 没有效果
    @xiao109 @brezp @james2013 @issakchill @agzou @mango88 @Chinsung 确实加了分片的 id 就会扫其中一个表的数据,order_id 用 snowflake 做了分布式 id ,在所有分表中是唯一的,扫全表我能理解,我感觉 sharding 是不是可以加个可配置项,在扫的过程中找到了就 return 不再继续去扫了,还是说我分片的姿势不对,应该拿 order_id 去做分片比较合理。
    @mcfog 不太理解你的意思,我需求就是 order_id 是唯一的,扫表找到了就返回结果,然后不要再继续剩下的表。
    吸烟经历跟你相似,吸了三年多了,三个月前决定戒烟,到目前为止差不多已经扔了十几把火机。。。每次闲下来就想抽就去买烟买火机。。。真难戒
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1087 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 16ms · UTC 23:44 · PVG 07:44 · LAX 16:44 · JFK 19:44
    ♥ Do have faith in what you're doing.