延迟关联 发表于 2020-08-19 更新于 2020-09-11 delayed_correlation 延迟关联, 通过优先使用索引定位数据范围, 之后再关联完整数据的方式, 加快查询 通常用来优化分页查询 如: 1select <cols> from profiles where sex = 'M' order rating limit 100000, 10; 随着偏移量的增加, MySQL 需要花费大量的时间来扫描需要丢弃的数据. 通过延迟关联的思想可优化为: 12345select <cols> from profilesinner join ( select <primary key cols> from profiles where sex = 'M' order by rating limit 100000, 10) as x using(primary key cols) 1. Resource https://www.cnblogs.com/wang-meng/p/ae6d1c4a7b553e9a5c8f46b67fb3e3aa.html