Is there anyway to Optimize SQL script by reusing the CTE result and not running it again in a View

Viewed 16

I am currently having an issue with regards to the used of views with complex joins and queries as it has slow performance. I tried to use CTE however it seems that it only simplify the complex look of the multiple query that I used into one reference and the performance is the same having multiple runs of that certain query inside the CTE. I also tried using temporary table while it improves the performance of the query it can't be applied to a View. Is there anyway to just reuse the result from the CTE without running it multiple times eventhough it is reference multiple times. Is it possible to cache the resultset then refer to it multiple time? Thanks in advance

0 Answers
Related