Active Entries
- 1: Surge Pricing for Grocery Stores is a Disaster Only Psychopath MBAs Could Love
- 2: Antarctica Day 7: Swimming In the Antaractic Seas
- 3: Restarted my yoga classes, and I discovered I'm a total wreck
- 4: Antarctica: Getting To the Boat and the Disaster That Awaited
- 5: The Enshittification of All That Lives
- 6: How the green energy discourse resembles queer theory
- 7: Tori's Sake & Grill (restaurant, review)
- 8: I'm Not Always Sure I Trust My ADHD Diagonosis
- 9: You can't call it "Moral Injury" when your "morals" are monstrous
- 10: Ebay vs Newmark: You're all just cogs. Accept it. There is no joy in it, but you have no choice.
Style Credit
- Base style: ColorSide by
- Theme: NNWM 2010 Fresh by
Expand Cut Tags
No cut tags
no subject
Date: 2009-09-30 11:53 pm (UTC)select * from items where id >= (select max(id) from items where id < N) limit 3
The subselect is (as above) is optimized away to a constant-time index lookup, and the item retrieval is done by walking along the index (signified by the type of "range"), making it also constant-time:
(I say "constant time"...btree lookups are actually O(logN), but with a *very* high logarithmic base. Also, the entire index is usually in memory, so it's blazingly fast even for millions of rows in the table.)