How Modern SQL Databases Come up with Algorithms that You Would Have Never Dreamed Of by Lukas Eder

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 มี.ค. 2017
  • SQL is the only ever successful, mainstream, and general-purpose 4GL (Fourth Generation Programming Language) and it is awesome!
    With modern cost based optimisation, relational databases like Oracle, SQL Server, PostgreSQL finally keep up to the promise of a powerful declarative programming model by adapting to ever changing productive data without performance penalties. Thousand-line-long, complex SQL statements can be run in far below a millisecond against billion-row strong tables if database developers know their ways around the SQL language - and the best news is: It's not that hard!
    In this talk, I'll show how the SQL database will constantly outperform any hand written data retrieval algorithm - or in other words - how SQL, being a logic language, is the best language for business logic.
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 37

  • @danieldiaz6025
    @danieldiaz6025 6 ปีที่แล้ว +3

    This is a great talk. I learned new things about window functions from the query at 18:36 (it seems that the OVER clause has an implicit "RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW", which is possibly the default behaviour when you include an ORDER BY).

  • @yankhonski9708
    @yankhonski9708 3 ปีที่แล้ว +1

    The talk is great!
    I think each tool has its purpose.
    SQL is used for data manipulation in relational databases.
    Java is used for building server side business logic, REST APIs.
    Javascript is for UI side (mostly).
    I could also use Kafka streams to solve this problem: each time I receive a payment event, I store it into the database and also I can process it separately. It is useful for large scale applications with millions of writes and replications.

  • @AndrewBrownK
    @AndrewBrownK 3 ปีที่แล้ว +3

    I love this talk so much, it never gets old

  • @mesutkayman
    @mesutkayman 7 ปีที่แล้ว +18

    Excellent talk

  • @kamillatosinski3054
    @kamillatosinski3054 6 ปีที่แล้ว +8

    I died when the ISS part came in :D

  • @magfal
    @magfal 3 ปีที่แล้ว

    27:20 the select syntax is an early approximation of natural language parsing.
    Think of it like how one would ask a warehouse employee to go fetch something for you in a complex set of storage locations, assuming that the person has little knowledge of the contents of the storage locations.
    Retrieve these items from the following locations but only the ones that match these criteria.

  • @tomknud
    @tomknud 7 ปีที่แล้ว +1

    Great discussion, thanks

  • @gggrow
    @gggrow 5 ปีที่แล้ว +20

    10 minutes in, I haven't learned that SQL is awesome yet but I have learned that Java is horrible

    • @Technomancr
      @Technomancr 5 ปีที่แล้ว +7

      I dunno, his arguments are kinda flawed. Like he spends 5 minute talking about getters/setters/hash/equals, which no one ever writes by hand. They just use lombok for. And then 30 seconds later he uses lombok in another place. Why not just use lombok in the first example? Oh right, he's writing bad java code on purpose to try and make a point.

    • @illyam689
      @illyam689 ปีที่แล้ว

      He is obviously exaggerating things

  • @coolcoolj0102
    @coolcoolj0102 5 ปีที่แล้ว +2

    Still really useful presentation to watch on 2019 : )

  • @hantt
    @hantt 5 ปีที่แล้ว +4

    pants are always greener in SQL

  • @seonwookim9595
    @seonwookim9595 ปีที่แล้ว

    Love the talk, learned a lot, great presentation

  • @donbeave
    @donbeave 3 ปีที่แล้ว

    Amazing talk!

  • @perrar1na
    @perrar1na ปีที่แล้ว

    Thank you

  • @lts8683
    @lts8683 ปีที่แล้ว

    Very useful

  • @kingluke2
    @kingluke2 5 ปีที่แล้ว +5

    So glad I gave up object-oriented programming years ago. Creates so much unnecessary complexity.

  • @andy12829
    @andy12829 3 ปีที่แล้ว

    Java Champion telling about SQL 😎

  • @wotwot6868
    @wotwot6868 7 ปีที่แล้ว +12

    If you go even further. You'll end up with Clojure.

    • @lukas_eder
      @lukas_eder 7 ปีที่แล้ว +3

      Indeed, Clojure lends itself to really elegant programming styles. I've seen a talk about Datalog and I was thrilled. Very beautiful!

    • @AndrewBrownK
      @AndrewBrownK 6 ปีที่แล้ว +5

      And lose type safety, no thanks

    • @133289ify
      @133289ify 5 ปีที่แล้ว +1

      @@AndrewBrownK f*ck types ;)

    • @coolcoolj0102
      @coolcoolj0102 5 ปีที่แล้ว +1

      may I know why?

  • @gnatinator
    @gnatinator 4 หลายเดือนก่อน

    8:20 ... jfc java. Pretty contrived example, though-- most languages aren't this bad.

  • @clray123
    @clray123 7 ปีที่แล้ว +2

    annotatiomania.com/ is the shit... annotations and the resulting "google it up, copy paste and maybe it will work" instead of understanding code is the worst thing that has happened to Java during its entire history.. what was once a single language has been turned into 100 different fucked up dialects.

  • @clray123
    @clray123 7 ปีที่แล้ว +5

    He's exaggerating a bit about Java, but his point is true. Can't count time when I've been facepalming myself because of all this boilerplate bullshit and HighBrowTheoryOfHowThingsShouldBeDone when all you need is to shuffle around some fucking bits of data (which happens to be what 99% of webapps consist of).
    And yes my advice to Java developers is throw away your fugly Hibernate whenever you can, hardcode the simple SQL statements and be done with the bs.

  • @JerreMuesli
    @JerreMuesli 6 ปีที่แล้ว +6

    +1 for flaming Lombok

    • @coolcoolj0102
      @coolcoolj0102 5 ปีที่แล้ว

      lombok is useful. He just flamed Hibernate annotation style

  • @133289ify
    @133289ify 5 ปีที่แล้ว

    tldw: java proxy bean factories suck

  • @igo_rs
    @igo_rs 7 หลายเดือนก่อน

    Using the worst java architecture for comparison is pathetic.

  • @sergeibatiuk3468
    @sergeibatiuk3468 3 ปีที่แล้ว

    Wow, these gifs are so annoying

  • @ShekharGulati7
    @ShekharGulati7 5 ปีที่แล้ว +2

    Bad talk. Talk about SQL please. Looks like we are learning Java

  • @thrael3
    @thrael3 6 ปีที่แล้ว +1

    SQL database is a liablity. It is number one reason why we have to duplicate expensive production database setup in test and catch frequent problems with incorrect execution plans.

    • @lukas_eder
      @lukas_eder 5 ปีที่แล้ว +18

      Yes, sometimes those execution plans don't behave. Sometimes. I'm sure that, given your opinion, you have carefully evaluated how often your hand written algorithms would not behave correctly if you *didn't* use SQL, and how much time you'd spend on fixing that, instead? SQL works 99.9% of the time and we spend some time fixing that remaining 0.1% (arbitrary numbers of course). How would that compare to hand written algorithms? And how much would it cost to write them?
      But I'm just repeating my talk :)