When I write stored procedure I use views that have calculation inside them and so if I have to reuse the view multiple times in my procedure, I load it to a temp table and then use the temp table throughout the procedure to avoid the same calculation begin done everytime the view is accessed.
But does this thing applies for straight table's data too?
So if I have to access same table multiple time in the stored procedure is it a good idea to load the data in temp table and access it rather than the original table?
Does it improve performance in any way? Since the data is then local to the procedure?
I am not sure because for procedure table data is also local in that sense.
Can any please help?