Performance Benefits to using Stored Scripts?

I haven't seen anything in the documentation that would suggest using stored scripts are better for performance, but intuitively I'd think running a stored script many times would perform better than running an inline script many times, as the stored script could be parsed and cached.

I was going to spend the next couple hours testing this, but thought I might as well check here first if there was a quick "yes or no" to this question.

If I plan to run the same exact script millions of times across different requests, would there be a performance gain from storing this script first and calling it by it's ID, or is it all the same and I can just use inline scripts?

If it makes a difference, the script is an update script.

A stored script isn't faster. We cache the compilation of inline scripts as well as stored scripts. We don't precompile stored scripts because we don't know what they'll be used for.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.