I need to get some requests to start in ~ 1-2 seconds. I am working on optimizing them, but it takes ~ 20 seconds on the first call of any of them and ~ 1 in all subsequent calls. This makes it impossible to determine whether any changes accelerate any changes, because it always works ~ 1 second after that. I am not very familiar with SQL, but from what I was able to find out, something seems to be caching. I am trying to figure out how to prevent this, but nothing works. From what I found on Google, people suggested
DBCC FREEPROCCACHE
or
OPTION(recompile)
None of them seem to work. Each request still works for ~ 1 second, the first time it took ~ 20. I just want to make sure that the changes I make cause improvements, and not that the improvements come from caching. Is there any other trick to do this?
source share