Reply to Re: HIT and MISS

Your name:

Reply:


Posted by Erland Sommarskog on 10/01/08 11:32

[posted and mailed, please reply in mail]

kmounkhaty@yahoo.com (smounkhaty@bremer.com) writes:
> My profiler trace does not display SP:CACHEMISS event, even thought I
> drop store proc, clear both data cache and buffer cache but still does
> not work.
>
> Every thing works fine like: cachehit,
> cacheinsert,cacheremove,executecontexthit etc...
>
> Is there any special option that I need to turn it on?

This is in fact a very common event in many systems - and far more common
that it have to be.

Create a stored procedure demo_sp as dbo, and grant exec rights to some
other non-priv user. Then log in as that user, and run the procedure
as "EXEC demo_sp". You will get a CacheMiss every time!

This is because SQL Server first looks up if the user owns a procedure
named demo_sp, in which case this is the one to be executed. There isn't
one, and whence the cache miss.

If you instead say "EXEC dbo.some_sp", you will not get the cache miss,
and this is good for overall performance of the system. Thus it is good
practice to specify "dbo." when you call stored procedures.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация