Adding an INDEX to a CTE

前端 未结 4 907
清歌不尽
清歌不尽 2020-12-05 04:13

Should be a pretty straight forward question. Can I add an INDEX to a Common Table Expression (CTE)?

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-05 05:08

    @B H - To get around the DISTINCT problem with using TOP 100% or TOP 1000000, you could always use GROUP BY. Serves the same purpose and is sometimes faster than DISTINCT.

提交回复
热议问题