I tryam trying to load test a simple insert stored procedure:
CREATE TABLE _test(ID BIGINT)
GO
CREATE OR alterALTER PROCEDURE dbo.test_sp
AS
BEGIN
SET NOCOUNT ON;
BEGIN
INSERT INTO _test
SELECT CAST(RAND() * 10000 AS BIGINT)
END
END
Not whenWhen I runexecute this spstored procedure with SQLStressthe SQL Stress tool, I get SQL Compilation\sec
SQL Compilations/sec equal to Batch Request\sec.
Interesting fact is thatBatch Requests/sec. Interestingly, SQL Re-Compilations\sec
SQL Re-Compilations/sec is 0zero.
Both optimized for ad-hoc
optimize for ad-hoc workloads and Forced parametrization
forced parameterization are enabled. The same picture is the same even if I change my spprocedure to a simple SELECT 1
. Any help will be appreciated.
I use
I am using Microsoft SQL Server 2016 (SP3) (KB5003279).
A profiler trace shows the tool sends a simple EXEC dbo.test_sp