I have a main data table?
I am writing a sproc to get data from this table and have to do some calculation pivoting.
Is it better to pull all the data I need at once in CTE and then pull from CTE to do the calculations and pivoting
or call from the main table and calculation and querys all at once?
Now there is no difference in the speed when i check execution plan?