﻿{"id":454,"date":"2023-10-21T08:45:32","date_gmt":"2023-10-21T00:45:32","guid":{"rendered":"https:\/\/blog.yyspark.com\/?p=454"},"modified":"2023-10-21T08:45:32","modified_gmt":"2023-10-21T00:45:32","slug":"sqlserver%e6%9f%a5%e8%af%a2%e8%a1%a8%e7%a9%ba%e9%97%b4%e5%8d%a0%e7%94%a8%e6%83%85%e5%86%b5","status":"publish","type":"post","link":"https:\/\/airlive.online\/index.php\/2023\/10\/21\/sqlserver%e6%9f%a5%e8%af%a2%e8%a1%a8%e7%a9%ba%e9%97%b4%e5%8d%a0%e7%94%a8%e6%83%85%e5%86%b5\/","title":{"rendered":"SqlServer\u67e5\u8be2\u8868\u7a7a\u95f4\u5360\u7528\u60c5\u51b5"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code><strong>SELECT\r\nobj.name \"\u8868\u540d\",\r\npt.rows  \"\u884c\u6570\",\r\nSUM(acu.used_pages)*8\/1024 \"\u5927\u5c0f\uff08MB\uff09\"\r\nFROM sys.objects obj \r\nJOIN sys.indexes idx on obj.object_id = idx.object_id\r\nJOIN sys.partitions pt on obj.object_id = pt.object_id\r\nJOIN sys.allocation_units acu on acu.container_id = pt.partition_id\r\nWHERE obj.type = 'U' AND idx.index_id IN (0, 1)\r\nGROUP BY obj.name, pt.rows\r\nORDER BY 3 DESC<\/strong><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-454","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/airlive.online\/index.php\/wp-json\/wp\/v2\/posts\/454","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/airlive.online\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/airlive.online\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/airlive.online\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/airlive.online\/index.php\/wp-json\/wp\/v2\/comments?post=454"}],"version-history":[{"count":1,"href":"https:\/\/airlive.online\/index.php\/wp-json\/wp\/v2\/posts\/454\/revisions"}],"predecessor-version":[{"id":455,"href":"https:\/\/airlive.online\/index.php\/wp-json\/wp\/v2\/posts\/454\/revisions\/455"}],"wp:attachment":[{"href":"https:\/\/airlive.online\/index.php\/wp-json\/wp\/v2\/media?parent=454"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/airlive.online\/index.php\/wp-json\/wp\/v2\/categories?post=454"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/airlive.online\/index.php\/wp-json\/wp\/v2\/tags?post=454"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}