473,773 Members | 2,269 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Sp:Cachemiss and no sp:recompile

Hello:

The installation details:

W2K SP4, SQL Server 2000 Ent with 1GB RAM. It is a Bi-P3.

When I run the Profiler to trace Stored Procedure performance, I get a
bunch of SP:CacheMiss for couple of stored procedure I invoke quite
often in a web app.
But I do not see SP:Recompile.

Here are my questions:

i) If the plan is not in the Cache, why am I not see SP: Recompile.
Where else can it be tugged.
ii) What are the other counters I need to monitor to see if I need more
memory.

Thanks in advance for any leads on this.

Regards:
Jul 20 '05 #1
4 4667

"J?r?my" <es***********@ hotmail.com> wrote in message
news:6e******** *************** ***@posting.goo gle.com...
Hello:

The installation details:

W2K SP4, SQL Server 2000 Ent with 1GB RAM. It is a Bi-P3.

When I run the Profiler to trace Stored Procedure performance, I get a
bunch of SP:CacheMiss for couple of stored procedure I invoke quite
often in a web app.
But I do not see SP:Recompile.

Here are my questions:

i) If the plan is not in the Cache, why am I not see SP: Recompile.
Where else can it be tugged.
ii) What are the other counters I need to monitor to see if I need more
memory.

Thanks in advance for any leads on this.

Regards:


Are you also seeing SP:ExecContextH it or SP:CacheInsert right after the
SP:CacheMiss? If so, one possibility is that your stored proc is called
sp_Something but is in a user database. In that case, since the name beings
with sp_, MSSQL looks first in the master database but doesn't find the proc
(SP:CacheMiss), then it tries the user database and finds the proc
(SP:ExecContext Hit). If that isn't the case, then perhaps you can give more
information about what the proc is doing, which database it's in, exactly
which SP events you see when you execute the procedure, and in what order?

Regarding memory, have a look at "Monitoring Memory Usage" in Books Online,
as well as this page:

http://www.sql-server-performance.co...ers_memory.asp

Simon
Jul 20 '05 #2
Hi Simon,

Thanks for your comments.

So, what I have in the Profiler:

RPC:Starting --> EXEC dbname.dbo.Mypr oc @Param
SP:CacheMiss --> Myproc
SP:ExecContextH it -->
SP:Starting --> EXEC dbname.dbo.Mypr oc @Param
....

The stored procedure that have the same profiling don't begin with
sp_*
but with Misc_* and return a recordset.

Regarding Monitoring memory, I have already checked it, before sending
a messsage to this group, and I didn't find any problem.
The server has 7Gb with 6Gb set to SQLServer (with AWE)
The SQL cache Memory is about 12Mb.

Then I don't know what happened.

Best,
Jeremy
Are you also seeing SP:ExecContextH it or SP:CacheInsert right after the
SP:CacheMiss? If so, one possibility is that your stored proc is called
sp_Something but is in a user database. In that case, since the name beings
with sp_, MSSQL looks first in the master database but doesn't find the proc
(SP:CacheMiss), then it tries the user database and finds the proc
(SP:ExecContext Hit). If that isn't the case, then perhaps you can give more
information about what the proc is doing, which database it's in, exactly
which SP events you see when you execute the procedure, and in what order?

Regarding memory, have a look at "Monitoring Memory Usage" in Books Online,
as well as this page:

http://www.sql-server-performance.co...ers_memory.asp

Simon

Jul 20 '05 #3
es***********@h otmail.com (J?r?my) wrote in message news:<6e******* *************** ****@posting.go ogle.com>...
Hi Simon,

Thanks for your comments.

So, what I have in the Profiler:

RPC:Starting --> EXEC dbname.dbo.Mypr oc @Param
SP:CacheMiss --> Myproc
SP:ExecContextH it -->
SP:Starting --> EXEC dbname.dbo.Mypr oc @Param
...

The stored procedure that have the same profiling don't begin with
sp_*
but with Misc_* and return a recordset.

Regarding Monitoring memory, I have already checked it, before sending
a messsage to this group, and I didn't find any problem.
The server has 7Gb with 6Gb set to SQLServer (with AWE)
The SQL cache Memory is about 12Mb.

Then I don't know what happened.

Best,
Jeremy


<snip>

In that case, another possibility is that you are not calling the proc
with exactly the same name, ie. you have changed the case of the
procedure name:

create proc dbo.p
as
select 1
go

exec dbo.p -- SP:CacheInsert
exec dbo.p -- SP:ExecContextH it
exec dbo.P -- SP:CacheMiss, then SP:ExecContextH it

Changing the case of the database name or owner doesn't result in a
cache miss, but changing the case of the procedure name does.

Simon
Jul 20 '05 #4
Thanks for your answer Simon,
I will check that.
Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1714
by: Bas | last post by:
Hi, I'm using SQL Server 2000 MSDE on a laptop running Windows XP. I have a couple of SP's that that quite some time to compile. So I was wondering: is there any way to have the database *not* recompile them every time after a reboot? BOL says: "As a database is changed by such actions as adding indexes or changing data in indexed columns, the original query plans used to access
7
5047
by: Harold | last post by:
Hi, I have a question in SQL Server 2K, I use SQL Profile to trace, and find Stored Procedure was auto recompiled, like this row in the trace: SP:Recompile 15 1680 76 2004-02-27 16:01:11.610 How can I stop the auto recompile. Thanks Harold
4
5838
by: acemann7 | last post by:
Windows 2000 udb v 7.2 Got the latest fixpak 13 Applied it. Still can't get a single java sp to run. I used to get reason "2"... now reason "0" - reason 0 is not even documented. I point jdk11_path to: Java Development Kit 1.1 installation path (JDK11_PATH) =
6
2672
by: MattC | last post by:
Hi, I'm implementing a new Business Layer in one of our applications. I'm toying with the idea of placing all the Create, Read, Update and Delete SQL in the object in question and build a dynamic SQL string using a class builder. The pros I can see are: It reduces the number of stored procs to admin. Changes to the underlying table schema does not require massive changes to
2
2401
by: Adam Rogas | last post by:
I have a couple of complex stored procedures that work well and quickly once they have compiled. The problem I am running into is that every once in a while they want to refresh thier execution plans, and when that happens it takes about 1 minute and 30 seconds for them to rebuild, well of course my application is set up to time out commands after 30 seconds so basicly the stored procedure never completes and hangs up all of my subsequent...
0
1262
by: justin.mayes | last post by:
We have a very large app. 200+gig db with 3 databases and hundreds of stored procs in each one. Its sql server 2000 (sp3) and asp.net 1.1. We have a full DBA staff and troubleshoot normal blocking issues and other valid timeout causes almost daily. We have seen an issue lately with one of our stored procs where it decides it will no longer complete when called from the web. It will timeout every time when run the web front end until the...
2
1219
by: jim_geissman | last post by:
I have a table of 25-30 million properties, from which are retrieved ~150 centered on a point, based on the parameters -- coordinates, property type and date of transaction. There's an SP (also implemented as a function returning a table) to return the desired records. This look-up takes the most time in the C# program that calls it, and should be optimized. It was suggested that instead of having an SP on the server, each time the...
1
2424
by: ARC | last post by:
So the long-awaited Access 2007 runtime SP-1 was released a couple days ago. I think the process will be to load SP1 for your development copy of Office 2007, then recompile your app, download the runtime SP-1, then create install packages using the new runtime, and newly compiled program files. Question is, what about the back-end db's that are in access 2007 (non SP1)? Typically these are not touched when you release new versions of an...
4
2518
by: Thomas R. Hummel | last post by:
We are using SQL Server 2005. The SP in question is a fairly simple select statement. When the developers run their unit tests it is timing out (15 second timeout is set from their end). When I run the SP in a query window using the exact same parameters it takes less than a second to run. I've run profiler and turned up nothing there, including deadlocks. The SP does show as having a duration of 15 seconds though. I've also run the...
0
9621
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10264
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10039
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9914
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7463
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5355
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4012
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3610
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.