views:

26

answers:

2

Hi,

I'm trying to optimize a SQL Server. I have some experience with Mysql and one of the things that usually help is to enable query cache, that will basically cache query results as long as you are running the same query.

Is there something similar to this on SQL Server? Could you please point what is the name of this feature?

Thanks!

+1  A: 

SQL Server will cache query results, but it's a little more complicated than in MySQL's case (since SQL Server provides ACID guarantees that MySQL does not - at least, not with MyISAM). But you'll definitely find that the second time you execute a query on SQL Server, it'll be faster than the first time (as long as no other changes have happened).

There's no specific name for this feature, that I'm aware of. It's more a combination of caches...

Dean Harding
+2  A: 

SQL Server doesn't cache result sets per se, but it does cache data pages which have been read, in addition to caching query execution plans. This means that if it has to read the same data pages again to answer a query, it will be faster since there are fewer physical reads (from disk) but you should still see the same amount of logical reads. Here is an article with more details.

RyanHennig