I'm not sure I understand your question. Stored procedures are compiled when
it is first created with the corresponding DDL command "create procedure
blah...."

At runtime, MS SqlServer may change it's execution plan for a given stored
proc, but strictly speaking it does not recompile the stored procedure in
the sense of validating the Sql to make sure it is correct. On the
otherhand, if you're using PreparedStatements, there is some sql compilation
that occurs. Generally, a prepared statement is only compiled once and
cached by SqlServer. SqlServer is pretty aggressive about caching the
compiled queries, so I would suggest turning on SqlServer profiler to see
what is happening.

Thrashing connections should not have any affect on compilation of stored
procedures, since that's not how stored procs work. If you're seeing high
CPU usage, it's typically due to queries that perform full table scans. I
would profile the sql statements and make sure they perform as expected.

hope that helps

peter



On 11/11/05, Richard Gaywood <[EMAIL PROTECTED]> wrote:
>
> Hi List! I've been working this week on a quite complex Test Plan to load
> test our DB add, based around MS SQL Server (hence my various questions
> bugging this list).
>
> Working earlier this evening, our senior architect identified that during
> the JMeter load test our SQL server was carrying out a lot of stored
> procedure recompiles. He wondered if this is because of JMeter thrashing
> connections. So far, I've applied the Microsoft supplied JDBC driver and I
> have "connection pool" on my JDBC config page set to "100" (I'm using
> 40-60
> threads in the test).
>
> Now that seems to me to be fine, but googling suggests there is a lot of
> mistrust of the MS JDBC driver. I downloaded jTDS and tried that but we
> saw
> the same behaviour.
>
> So, my question has two parts:
>
> 1) does the pooling in JMeter Just Work (TM)? I know it's built into JDBC
> so
> I suppose it really should...
>
> 2) does anyone who's used JMeter to load test SQL server have any
> thoughts,
> tips, or insights into what I'm trying to do? Like recommending a JDBC
> library, for example?
>
> Thanks in advance!
>
>

Reply via email to