Testing SQL Code without cache - SQL Server
To find out how long a SQL query takes to run, you can't have the results already in the SQL Server cache.
To clear the SQL cache, enter:
DBCC DROPCLEANBUFFERS
If you are testing a stored procedure, clear the stored procedue cache by entering:
DBCC FREEPROCCACHE
To clear the SQL cache, enter:
DBCC DROPCLEANBUFFERS
If you are testing a stored procedure, clear the stored procedue cache by entering:
DBCC FREEPROCCACHE

0 Comments:
Post a Comment
<< Home