Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15889

Difference between running a query from a script and a Stored Procedure

$
0
0

Hi All -

We are working on a performance tuning project for fixing slow running queries. We have used enhanced indices, temporary tables, query tuning techniques and succeeded in fixing all those issues

However, we see that there is one weird issue. The same set of steps, while executing through a script runs faster, whereas while compiling them as an SP, takes longer time to execute, while the actual result should be the other way round (SP faster than standalone script)

Is my question very broad in scope? If you need additional information to help me find an answer, kindly let me know

Thanks a bunch

Krishna



Viewing all articles
Browse latest Browse all 15889

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>