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

Plan Cache. Size in sys.dm_os_performance_counters and sys.dm_exec_cached_plans

$
0
0
Hello!Counter "SQLServer:Plan Cache - Cache Pages - _Total" shows real value?Example:SQL Server 2014 EnterpriseRAM: 128 GbMaximum server memory set to 102 Gb.[code="sql"]select counter_value = cast(round(t.cntr_value * 8 / 1024.0, 2) as decimal(19, 2))from sys.dm_os_performance_counters as twhere t.object_name = 'SQLServer:Plan Cache' and t.counter_name = 'Cache Pages' and t.instance_name = '_Total'[/code]Result is about 8000But if check this:[code="sql"]select count(*) as count_t, cast(round(sum(cast(decp.size_in_bytes as bigint))/1024.0/1024.0, 2) as decimal(19, 2)) as size_in_mbfrom sys.dm_exec_cached_plans as decp[/code]Result is about 2000 Mb and 10 000 of plans.After SQL Server restarted in sys.dm_exec_cached_plans I see 8000 Mb and 60 000 of plans. But in next days this values goes down.What is it?If it result of memory pressure why sys.dm_os_performance_counters doesn't change value?

Viewing all articles
Browse latest Browse all 6525

Trending Articles