{"id":2053,"date":"2015-05-21T19:17:23","date_gmt":"2015-05-21T17:17:23","guid":{"rendered":"http:\/\/soci.hu\/blog\/?p=2053"},"modified":"2015-05-26T18:07:57","modified_gmt":"2015-05-26T16:07:57","slug":"szemettel-teli-plan-cache","status":"publish","type":"post","link":"https:\/\/soci.hu\/blog\/index.php\/2015\/05\/21\/szemettel-teli-plan-cache\/","title":{"rendered":"Szem\u00e9ttel teli plan cache"},"content":{"rendered":"<p>Ha a plan cache tele van csak egyszer haszn\u00e1lt planekkel, akkor azok csak feleslegesen eszik a mem\u00f3ri\u00e1t.<br \/>\nAz al\u00e1bbi lek\u00e9rdez\u00e9s erre vil\u00e1g\u00edt r\u00e1:<\/p>\n<pre class=\"brush: sql; title: ; notranslate\" title=\"\">\r\nSELECT objtype AS &#x5B;CacheType]\r\n        , count_big(*) AS &#x5B;Total Plans]\r\n        , sum(cast(size_in_bytes as decimal(18,2)))\/1024\/1024 AS &#x5B;Total MBs]\r\n        , avg(cast(usecounts as bigint)) AS &#x5B;Avg Use Count]\r\n        , sum(cast((CASE WHEN usecounts = 1 THEN size_in_bytes ELSE 0 END) as decimal(18,2)))\/1024\/1024 AS &#x5B;Total MBs \u2013 USE Count 1]\r\n        , sum(CASE WHEN usecounts = 1 THEN 1 ELSE 0 END) AS &#x5B;Total Plans \u2013 USE Count 1]\r\nFROM sys.dm_exec_cached_plans\r\nGROUP BY objtype\r\nORDER BY &#x5B;Total MBs \u2013 USE Count 1] DESC\r\n<\/pre>\n<p>Megk\u00e9rn\u00e9lek benneteket, akik \u00e9les, nagy terhelts\u00e9g\u0171 SQL szervert \u00fczemeltetnek, hogy futtass\u00e1tok le a fenti parancsot, \u00e9s k\u00fcldj\u00e9tek el az eredm\u00e9nyt, k\u00edv\u00e1ncsi vagyok, hol-milyen eredm\u00e9nyek j\u00f6nnek vissza.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ha a plan cache tele van csak egyszer haszn\u00e1lt planekkel, akkor azok csak feleslegesen eszik a mem\u00f3ri\u00e1t. Az al\u00e1bbi lek\u00e9rdez\u00e9s erre vil\u00e1g\u00edt&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,4,30],"tags":[],"class_list":["post-2053","post","type-post","status-publish","format-standard","hentry","category-adatbazisok","category-szakmai-elet","category-sql-server"],"_links":{"self":[{"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/posts\/2053","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=2053"}],"version-history":[{"count":2,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/posts\/2053\/revisions"}],"predecessor-version":[{"id":2068,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/posts\/2053\/revisions\/2068"}],"wp:attachment":[{"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=2053"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=2053"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=2053"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}