Sort Operation Performance

john s 2015-11-14 13:48:46

Aaron Bertrand 2015-11-18 20:31:56
One simple way to get rid of all those sort operations is to use UNION ALL instead of UNION and, if necessary (I don't think it is), apply DISTINCT once on the output (hopefully, though, that can be avoided, too).