4 ms·
I guess the point is you could just stick the results of each step that is currently a CTE into #table as separate queries, and you're only doing the work once
by Ntrails 4y ago
I guess the point is you could just stick the results of each step that is currently a CTE into #table as separate queries, and you're only doing the work once to step through the stages?
From a debug point of view that feels more convenient to _me_.
- Bootvis 4y agoI guess it depends, materialising all the steps might be slow and you might need to do a refactor to get a CTE-based query. If you want just want to check a few (maybe changing) records because you expect problems there a final select with an appropriate where is probably faster. Edit: also I don’t like to leave a mess behind and CTE’s don’t require cleaning up afterwards.