4 ms·
For a little more context, from High Performance MySQL, 3rd Edition (2012) > This "deferred join" works because it lets the server examine as little data as po
by aarondf 5y ago
For a little more context, from High Performance MySQL, 3rd Edition (2012)
> This "deferred join" works because it lets the server examine as little data as possible in an index without accessing rows, and then, once the desired rows are found, join them against the full table to retrieve the other columns from the row.
From High Performance MySQL, 4th Edition (2021)
> This "deferred join" works because it lets the server examine as little data as possible in an index without accessing rows, and then, once the desired rows are found, join them against the full table to retrieve the other columns from the row.
So I mean... it's not a crazy idea. Sometimes you just have to offer directly addressable pages in an application and can't get away with cursors, which are far better in certain circumstances.
I agree that you'll see no benefit if you were paginating PKs in the first place, but most app developers are paginating actual records, right?
This is written from the point of view of application developers. I'm sure that all the DBAs are skeptical right now, but when pages go from 30 seconds to 300 milliseconds [1] or 28 seconds to 2 seconds [2] that's kind of a win right?
[1] https://twitter.com/mdavis1982/status/1482429071288066054 https://twitter.com/mdavis1982/status/1482429071288066054
[2] https://twitter.com/joecampo/status/1483550610028957701 https://twitter.com/joecampo/status/1483550610028957701
- talaketu 5y ago> you'll see no benefit if you were paginating PKs in the first place, but most app developers are paginating actual records, right? You are unclear on this point, but I don't really see how it addresses any of parent's (grogers) counterpoints. Maybe be a critical concept for you to reconsider! (I suspect application developers mainly use OFFSET/LIMIT because it's simple to implement and readily availability in SQL, rather than the optimal way for the user to accomplish their task.)