sql server - SQL - slow only on first run...can't tell if my changes make it faster or not -


i have sql script made of 3 queries runs on first run inside of sql management studio (about 90 seconds). subsequent runs after take 0-5 seconds. obviously, it's caching it. declare , use few keys , variables @ top, , want know if script modifications making difference in performance, can't if it's faster second time.

what can t-sql make not use cached version? ask because want play sql make faster, can't tell if i'm making difference because first time of running script slow.

dbcc dropcleanbuffers answer not run in production environment. removes buffer cache , result in slow down cause down time in busy environment.

do not confuse dbcc freeproccache, should never run in production. clears out of cached query plans , cause them have go through recompilation. however, can specify plan handle 1 @ time.


Comments

Popular posts from this blog

shader - OpenGL Shadow Map -

stringtemplate - StringTemplate4 if conditional with length -