8

Is there any performance gain using a CTE over a derived table?

D.S.
  • 1,413
  • 2
  • 16
  • 26

2 Answers2

3

I've used CTEs a lot and it does actually appear to run faster in some scenarios. The server was fairly well loaded, the variation in times on runs was pretty significant, and I can't believe the execution plan was that different, but it still seemed like the ones with the CTE performed better.

Cade Roux
  • 88,164
  • 40
  • 182
  • 265
3

From what I have read and my limited use of them, no, they are just easier to read and can reference themselves.