Pages

Monday, April 18, 2011

Cleaning the data buffers and cache Procedures

The response time of a commercial application is an almost mandatory requirement for its success. Several factors contribute to the efficiency of the developed applications, the performance of queries to the database is one of these factors.

To optimize the queries, there are many practices and tools such as indexes, filters, reducing the number of columns, etc.. And it's very good idea to take the greatest possible number.

Often, when you implement queries, each procedure or via ad-hoc commands, we could not test its efficiency, because, once executed, SQL Server stores information about its execution to optimize future access. This is a powerful feature, mainly to accelerate the return of queries performed more frequently.

To test the actual performance of queries implemented, it is necessary to ignore the action of the buffers and caches. We can do this task using the commands below:

- Cleanning cache procedures
DBCC FREEPROCCACHE

- Cleanning buffers (add-hoc commands)
DBCC DROPCLEANBUFFERS

No comments:

Post a Comment