By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,359 Members | 1,481 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,359 IT Pros & Developers. It's quick & easy.

HIT and MISS

P: n/a
Hi Guru,

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?

Please help,

Thanks,
Silaphet,

Nov 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
[posted and mailed, please reply in mail]

km********@yahoo.com (sm********@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, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Nov 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.