Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

Compilations/sec to Batches/sec

$
0
0
Hi,I am recording the counter values for Batch Requests/sec and Compilations/sec, to try and understand the workload and activity.I have read that as a benchmark we should have about 1 compile per 10 batches. (or there about..)We on the other hand have a 1:1 to 1:2 ratio.This either means the server cannot keep the plan in cache long enough or it is seeing loads of first time queries all the time.I am almost certain it is not because of new queries because 99% of the code is in existing stored procs being called over and over again. Yes there are some individual CRUD statements and some stored procs using Dynamic SQL.So then it must be that the server can't keep it in memory long enough, correct?I am also seeing the majority of plans in cache is Adhoc; and that 70% of those plans have a UseCount of 1.Can you tell me WHY the server can't keep it in memory? Or why I have so many first time compilations or single use plans?We are running SQL 2014, have 120 GB RAM, 24 CPU server with an average of 1000 Batch Requests per second.

Viewing all articles
Browse latest Browse all 3145

Trending Articles