当遇到如下250的SQL时,又没办法改SQL,只能优化数据库的情况下。
索引pid,no,equipmentCode,和索引pid,有着巨大的差异。在索引中包含order by 的列,将极大提升速度。
ROW_NUMBER() OVER (PARTITION BY pid ORDER BY no ASC, equipmentCode) AS rowNum
标签:equipmentCode,no,pid,数据库,SQLServer,索引,优化 From: https://www.cnblogs.com/wigis/p/16862343.html