Performance oriented Spring Data JPA & Hibernate by Maciej Walkowiak

Поделиться
HTML-код
  • Опубликовано: 29 янв 2025
  • НаукаНаука

Комментарии • 55

  • @vladmihalcea
    @vladmihalcea 10 месяцев назад +154

    Great talk and thanks for the shout out!

    • @richardwang3438
      @richardwang3438 10 месяцев назад +8

      you look familiar

    • @frostbittenkingdoms245
      @frostbittenkingdoms245 10 месяцев назад +2

      Of course you were mentioned in the first five minutes :D.

    • @vladmihalcea
      @vladmihalcea 9 месяцев назад +3

      @@frostbittenkingdoms245 Who would have thought? :D

  • @jonnycoddington1883
    @jonnycoddington1883 10 месяцев назад +12

    This is an absolute goldmine, thanks Maciej!!! We have a part of our application that takes about 40ms to do a simple insert so this talk is excellently timed 👌🏻

  • @gnanendrareddy6018
    @gnanendrareddy6018 20 часов назад

    learned many things, enjoyed every second of the talk

  • @ПавелКуперштейн-Чалей
    @ПавелКуперштейн-Чалей 9 месяцев назад +3

    This was exceptionally useful, thanks mr. Walkowiak

  • @lytung1532
    @lytung1532 10 месяцев назад +3

    Thanks for sharing. More sessions like this please!

  • @rieckpil
    @rieckpil 10 месяцев назад +3

    Awesome talk, Maciej. One can not emphasis enough the importance of understanding what's going on behind Hibernate & Spring Data JPA - I really liked the wallpaper 🍃

  • @codewithtee
    @codewithtee 4 месяца назад +1

    This is actually a good talk, applicable across several languages

  • @joachimdietl6737
    @joachimdietl6737 10 месяцев назад +3

    I once attended one of Vlad's lectures at the JAX and i had the feeling (same as here) that the time is over, when it is getting interesting.

  • @jimishukurow2286
    @jimishukurow2286 10 месяцев назад +9

    Definitely need to try PROJECTIONS ...

  • @JorgeCorradi
    @JorgeCorradi 10 месяцев назад +2

    Pure gold! Thank you so much for the awesome presentation.

  • @tobyzieglerrr
    @tobyzieglerrr 10 месяцев назад +1

    Very very good talk, hands on and i took away at least 4 things that i did not know or did not fully understand before. Thanks!

  • @vladlazar94
    @vladlazar94 3 месяца назад

    As a Java beginner, this talk made me want to steer clear of JPA.

  • @CodeJava
    @CodeJava 15 дней назад

    is this video about using Flexy Pool for database connection pooling ???

  • @digma1769
    @digma1769 7 месяцев назад +1

    Thanks for the mention:) We appreciate it!

  • @Tu-xw7od
    @Tu-xw7od 6 месяцев назад

    at 21:49 can anyone help me explain why Hibernate logs appeared before Flexypool's logs? thanks in advance 🙇🏻

  • @CanhNguyen-ls7kq
    @CanhNguyen-ls7kq 10 месяцев назад +1

    Good talk, thank you Maciej

  • @RaviTeja-gq5wm
    @RaviTeja-gq5wm 5 месяцев назад +1

    Hi Everyone, I have one issue. Can someone please check and let me know what might be the problem.
    I have one sql retrieval query on VIEW, which has large data with some joins and unions. Now when I execute the plain sql query in sql developer it took 250 ms. And I have tried same SQL query hardcoded values in @Query, it took around 320 ms.
    But when I make that sql query parameterized using @Query and @Param, it’s taking around 32 seconds.
    Can someone tell me what is happening here? Sorry for unable to share the sql and code details.
    Thanks in advance 👍🏻

  • @emileastih9006
    @emileastih9006 7 месяцев назад +1

    Hello and thank you for the great presentation. I guess everyone learned something from watching this talk.
    I just have one question towards the end of the talk we could combine JPA specifications With fetching projections dynamic so that way we can also pass dynamic condition to our dynamic projection?

  • @fipabrate
    @fipabrate 10 месяцев назад +2

    Very very good talk. I enjoyed it

  • @krzysztofm8279
    @krzysztofm8279 5 месяцев назад +1

    Great talk. Personally I think this is not fully applicable to to cloud like installations where db might be remote and having short but many session may give opposite effect as cost of interacion multiply by hundreds may lead to significant delay in app response time. I have seen such case recently.

  • @illyam689
    @illyam689 10 месяцев назад +3

    34:34 "It's a commercial tool, which is great.. for Vlad" ROTFL!! 🤣🤣🤣

  • @vivekbansal-bc9eg
    @vivekbansal-bc9eg 9 месяцев назад

    I have a question in bank transfer execute method he said hibernate will open the session then closes in case of findById.But earlier he said because of OSIV it mantains a session throughout request after a db call. can anyone answer

  • @kavinduchamiran4869
    @kavinduchamiran4869 10 месяцев назад

    27:20 I didn't understand how annotating the execute() method with @Transactional reduced the number of database queries. Can someone explain pls?

    • @TheMaciejek
      @TheMaciejek 10 месяцев назад +1

      Because we have already assigned ids for these entities, and thus save() method will underneath invoke merge() instead of persist() and merge underneath has to check if these entities exists, so it has to issue another select query. In case when you are using @Transactional, the entities from the first and second select will be stored in hibernate session cache and thus the merge, instead of firing new request, can simply take it from cache.

  • @ayoubzoubeidi8052
    @ayoubzoubeidi8052 9 месяцев назад

    thank you for this amazing talk

  • @TheMrDrakiula
    @TheMrDrakiula 10 месяцев назад +2

    Vlad actually used to work on the Hibernate project for RedHat in the past at some point.

  • @Nick-yd3rc
    @Nick-yd3rc 7 месяцев назад

    Awesome talk, thanks!🎉

  • @SBala-xk6lr
    @SBala-xk6lr 10 месяцев назад

    This was exceptional. Thanks

  • @tahahajivand1843
    @tahahajivand1843 10 месяцев назад

    it was really helpful. thank you for your hard work

  • @Tu-xw7od
    @Tu-xw7od 6 месяцев назад

    Thanks so much for this video. It helped me a lot. Thanks.

  • @f1r0ud
    @f1r0ud 4 месяца назад

    Great Talk Man !!

  • @praveens2272
    @praveens2272 10 месяцев назад +20

    If anyone doesn't understand jpa and hibernate at this level(internal workings), they will screw up the application. I think it's better to write plain SQL queries and execute or may be JOOQ helpful.

    • @rajeshhazari
      @rajeshhazari 9 месяцев назад

      Thanks, do you have any simple spring boot starter for Jooq for and intermediate level experience with jdbc and pure sql

    • @praveens2272
      @praveens2272 9 месяцев назад

      @@rajeshhazari i didn't understand your question, you need code samples for JOOQ ?

    • @rajeshhazari
      @rajeshhazari 9 месяцев назад

      ​@@praveens2272 yes some samples starters using jooq to show complex examples

  • @KoenDeJaeger
    @KoenDeJaeger 3 месяца назад

    I tried open-in-view -> false, and the applications feels 30% slower now.

  • @joachimdietl6737
    @joachimdietl6737 10 месяцев назад

    Nice video!

  • @kalamatej
    @kalamatej 8 месяцев назад

    Golden ❤

  • @odrotbohm
    @odrotbohm 10 месяцев назад +7

    Is there any reason you did not fix the aggregate model instead? It's a phenomenon I run into quite frequently: folks run into performance problems and immediately resort to tweaking persistence metadata, when *actually* the problem is in the model itself.
    Spring Data deals with DDD aggregates, in which Many-to-One relationships to other aggregates have no place at all. Those would be modeled as identifier references instead, so that these are basic values to Hibernate, and it would not need to resolve references The entire lazy/eager discussion is avoided on the Hibernate level. No get-by-reference tricks, no tweaking of Hibernate metadata. Applications would simply resolve the identifiers when they *actually* need the reference. Creating a BankTransfer wouldn't even need to resolve the accounts beforehand.

  • @praveens2272
    @praveens2272 10 месяцев назад +1

    This demo code is available in GitHub? If not please share the link. Thanks.

    • @gauntr
      @gauntr 10 месяцев назад

      Gib code pls 😂

    • @Arunkumar-uz3vh
      @Arunkumar-uz3vh 10 месяцев назад +4

      It's there on his GitHub page. Repo name: performance-oriented-spring-data-jpa-talk

  • @abirbasak1948
    @abirbasak1948 10 месяцев назад

    Using hibernate for 5 years, I agree that it is not the best tool for database handling. Most of the time plain SQL is much more predictable and easy to work with

  • @kanaillaurent526
    @kanaillaurent526 10 месяцев назад

    First YAGNI Spring

  • @nirmalmewada
    @nirmalmewada 10 месяцев назад +1

    Simple answer is dont use Hibernate, It makes simple problem more simpler (which we might not need) and complex problem more complex (which we definatly not need it), Got for micro framework like MyBatis if you really want to consider performance, its great sweet point.

  • @Sucheit
    @Sucheit 10 месяцев назад

    cant even lazy load one to one

  • @matdryz
    @matdryz 10 месяцев назад +1

    Do you have a long running transaction? just split it into two transactions 😂

  • @KennethJackson-l8n
    @KennethJackson-l8n 4 месяца назад

    Shields Mountain

  • @geraldodev
    @geraldodev 10 месяцев назад

    Or use SQL and clojure with it's awesome data strucutres :)

  • @Rockstar-w6j
    @Rockstar-w6j 4 месяца назад

    spring is slow java is fastt

  • @jimishukurow2286
    @jimishukurow2286 10 месяцев назад

    Projections with nested entities are sucks ...

  • @Blacksun777
    @Blacksun777 5 месяцев назад

    This is great to know and think about, thanks