How Modern SQL Databases Come up with Algorithms that You Would Have Never Dreamed Of by Lukas Eder
DevoxxRecommended by 3 HN commenters across 3 months, 2019–2023
talk · intermediate · evergreen · 2019–2023 on HN
Lukas Eder's Devoxx talk on how modern cost-based SQL optimizers rewrite and plan queries in ways developers would not expect. It argues that declarative SQL, used well, can run complex queries very fast.
HN commenters recommend it to developers unfamiliar with how much leverage and intelligence there is in a SQL database.
Up next
11 mo on HN"Testing Distributed Systems w/ Deterministic Simulation" by Will Wilson
Strange Loop Conference
Recommended 12× on HN · 2014–2024
11 mo on HNThe Value of Values with Rich Hickey
InfoQ
Recommended 10× on HN · 2014–2023
9 mo on HNAWS re:Invent 2018: Amazon DynamoDB Deep Dive: Advanced Design Patterns for DynamoDB (DAT401)
Amazon Web Services
Recommended 12× on HN · 2019–2025
9 mo on HN"Turning the database inside out with Apache Samza" by Martin Kleppmann
Strange Loop Conference
Recommended 9× on HN · 2015–2025
7 mo on HNConflict Resolution for Eventual Consistency • Martin Kleppmann • GOTO 2016
GOTO Conferences
Recommended 3× on HN · 2017–2020
6 mo on HN01 - Course Introduction & Relational Model (CMU Databases Systems / Fall 2019)
CMU Database Group
Recommended 6× on HN · 2020–2023
6 mo on HNIntroduction to NoSQL • Martin Fowler • GOTO 2012
GOTO Conferences
Recommended 6× on HN · 2015–2021
5 mo on HNRich Hickey rants about HttpServletRequest in 1080p: Death By Specificity from Clojure Made Simple
Fred Overflow
Recommended 5× on HN · 2020–2026
6 mo on HNTigerStyle! (Or How To Design Safer Systems in Less Time) by Joran Dirk Greef
TigerBeetle
Recommended 2× on HN · 2023–2025
5 mo on HNBryan Cantrill from Joyent on Manta: internet-facing object storage facility that features compute
AI Council
Recommended 4× on HN · 2014–2026
5 mo on HNMichael Stonebraker | Big Data is (at least) Four Different Problems
Michigan Engineering
Recommended 5× on HN · 2015–2024
5 mo on HN"I See What You Mean" by Peter Alvaro
Strange Loop Conference
Recommended 6× on HN · 2016–2019
6 comments from Hacker News
> This may be more intuitive for some developers, especially those that don't use SQL all the time. I tend to recommend my famous talk to such developers: ▶ this video
I would suggest that learning SQL (the syntax) isn't the crux--it's just syntax you learn over time based off need, just like learning python--what you need is motivation. I'd suggest watching this video to get a flavor of how much leverage using the database can give you: ▶ this video If the database can make you more productive and more efficient and make your life easier, you now have incentive to use it more. Another thing that took my use of databases to the next level, was using PostGraphile ( link ). It takes a PostgreSQL database and provides a GraphQL endpoint for it. Use that as your only backend. You can use PostgreSQL row-level security to do access control (who can see or modify what). You can use PL/pgSQL to write business logic for higher level calculations. You can use constraints and triggers to do data validation. Each of these areas has an initially steep learning curve, and wonky syntax, but once you get over them you can implement many backends extremely quickly with them. And using PostGraphile where you only have SQL available (well, you can also add javascript extensions, but try to limit those) will be a great forcing function that will require you to scour stackoverflow and the excellent PostgreSQL docs to learn many of the useful corners of SQL you'd never learn otherwise.
I use to think that too. This is a good talk about how smart SQL query engines are. It is an hour though ▶ this video
>Totally agree. Lukas Eder has some nice presentations about it. Thanks for the shout out! For the record, that's probably the referenced talk: ▶ this video
> further, afaik there's no assignment nor iteration in SQL That was until CTEs were introduced in SQL:1999 > it's not a programming language at all. It's a.. query language. The two are not mutually exclusive. SQL is used to tell a computer what to do, and it is very powerful at it: ▶ this video
This talk ("How Modern SQL Databases Come up with Algorithms that You Would Have Never Dreamed Of by Lukas Eder" ▶ this video ) is not particularly gripping, but he does claim that modern database engines will ignore indexes if they estimate it will be faster to read all the data than it is to access the index first then read the relevant data. And that Oracle can have multiple execution plans and switch between them mid-query if the first one isn't working out as expected. Could this be a rare case of the mythical sufficiently smart compiler having more information at runtime than the programmer has at coding time, and that if you could hint which index to use, the trade off would be that you'd instead be troubleshooting queries which end up slower because of it?