“It's the best resource that I've seen with respect to databases and indexing.”
Markus Winand 写的在线教程,从开发者角度讲数据库索引如何存储、查询如何用到索引,以及where 条件、排序、分页、连接等写法对性能的影响。内容不绑定某一种数据库,同时标出各家数据库的差异。作者另有同主题的纸质书,这个网站是免费在线版。和泛泛的 SQL 入门不同,它只盯着性能这一个主题讲透。
HN 上的人认为它是讲数据库索引最好的资源之一,说开发者几乎必读;常被引用来解释聚簇索引,以及用 keyset 分页代替 OFFSET 的做法。
写 SQL、关心查询性能的后端开发者
怎么读
由 Claude 根据这本书和 HN 上的说法整理,可能有错- 1先读索引的内部结构和 where 子句那几章,这是全书基础
- 2边读边在自己用的数据库上查看执行计划,验证例子
- 3分页、排序等专题可以遇到问题时单独翻阅
- 4和自己数据库的官方文档对照,注意各家的差异
HN 书评
推荐在前,同类按时间 · 每本最多保留 20 条,统计用全部提及 · 作者本人贴的不算“Use The Index, Luke! is a great online book (free) targeted at programmers and developers. It's practically required reading in my opinion.”
“I highly recommend his "No to offset" tutorial Use The Index, Luke!”
“I can't recommend the "Use The Index, Luke"[1] tutorial, and the accompanying book "SQL Performance Explained" by Markus Winand, enough.”
“The list is missing Use The Index, Luke! and (链接) which are some of the very best resources out there for SQL in general.”
“is a good resource once you know the basics.”
看全部 20 条 →
“This is a really good resource for understanding how the queries you do relate to the actual actions that the database engine takes.”
“Use The Index, Luke! helps when you deal with performance issues. The examples can be altered for your particular SQL server including postgres.”
“And this excellent SQL blog:”
“I think Markus (2) explains this much better than I do, so I'll just link his text.”
“If you aren't sure, this site here is an excellent resource.”
“Not Postgres, but I also found this significantly (if not more) enlightening while I was building my first RDB using SQLite Use The Index, Luke!”
“See Use The Index, Luke! as a good run down of the whys and wherefores of clustered indexes.”
“[1] Use The Index, Luke! is a very good resource for this.”
“I have to again recommend the excellent "Pagination done the Right Way" presentation[1] from Use the Index, Luke (an equally excellent site).”
“I have found that Use The Index, Luke is a good reference when looking at optimizations.”
“you should check out this site Use The Index, Luke! or a book by the same author (链接)”
“See here for the real way to handle paging for large result sets: Use The Index, Luke!”
“Both this guide and Use The Index Luke seem to be good resources.”
“I'd suggest avoiding window functions for pagination.. see Use The Index, Luke! as one method.”