codeismylife
V2EX  ›  问与答

spring data jpa findall 超级慢

  •  
  •   codeismylife · Mar 13, 2019 · 3738 views
    This topic created in 2643 days ago, the information mentioned may be changed or developed.
    刚用 jpa,发现自定义的方法 findallByState(Pageable pageable)非常慢。这个方法只是根据 state 字段查询并分页,拿出来 sql 语句到 oracle 里只执行了 0.02s ,在 jpa 里竟然需要 2 分钟!!我是不是遗漏什么地方了?
    1 replies    2020-07-24 10:08:40 +08:00
    kensin
        1
    kensin  
       Jul 24, 2020
    +1 同问,1000 万的数据库,用 findAll 取出来得俩小时....请问各位大佬有啥好办法吗?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2961 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 14:32 · PVG 22:32 · LAX 07:32 · JFK 10:32
    ♥ Do have faith in what you're doing.