Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15694

Why the SQL Compilations/sec counter is 2 even when I just compile only one sentence ?

$
0
0
CREATE TABLE [dbo].[t11](
 [col1] [int] NOT NULL
PRIMARY KEY CLUSTERED
(
 [col1] ASC
)

GO

DBCC FREEPROCCACHE

go

After  creating the table,then I open the performance monitor with SQL Compilations/sec counter at SQL server:SQL statistics category , and ran the following script, but the SQL Compilations/sec  is2.

select * from [dbo].[t11] where  [col1]=123

My question is there is only one sentence ,why the  SQL Compilations/sec   is 2?

environment:

version :Microsoft SQL Server 2012 - 11.0.2100.60 (X64)  Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)

OS: Win7 64



Please click the Mark as Answer button if a post solves your problem!




Viewing all articles
Browse latest Browse all 15694

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>