{"id":2173,"date":"2019-05-06T14:36:59","date_gmt":"2019-05-06T13:36:59","guid":{"rendered":"https:\/\/solidt.eu\/site\/?p=2173"},"modified":"2019-05-06T14:37:00","modified_gmt":"2019-05-06T13:37:00","slug":"mssql-table-row-count-overview","status":"publish","type":"post","link":"https:\/\/solidt.eu\/site\/mssql-table-row-count-overview\/","title":{"rendered":"MSSQL Table row count (overview)"},"content":{"rendered":"\n<figure class=\"wp-block-embed-wordpress wp-block-embed is-type-wp-embed is-provider-sql-authority-with-pinal-dave\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"3LWoCHpr7A\"><a href=\"https:\/\/blog.sqlauthority.com\/2017\/05\/24\/sql-server-find-row-count-every-table-database-efficiently\/\">SQL SERVER &#8211; How to Find Row Count of Every Table in Database Efficiently?<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;SQL SERVER &#8211; How to Find Row Count of Every Table in Database Efficiently?&#8221; &#8212; SQL Authority with Pinal Dave\" src=\"https:\/\/blog.sqlauthority.com\/2017\/05\/24\/sql-server-find-row-count-every-table-database-efficiently\/embed\/#?secret=DUGqV0r9hY#?secret=3LWoCHpr7A\" data-secret=\"3LWoCHpr7A\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">SELECT SCHEMA_NAME(schema_id) AS [SchemaName],\n[Tables].name AS [TableName],\nSUM([Partitions].[rows]) AS [TotalRowCount]\nFROM sys.tables AS [Tables]\nJOIN sys.partitions AS [Partitions]\nON [Tables].[object_id] = [Partitions].[object_id]\nAND [Partitions].index_id IN ( 0, 1 )\nGROUP BY SCHEMA_NAME(schema_id), [Tables].name\nORDER BY TotalRowCount DESC<\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2173","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/2173","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/comments?post=2173"}],"version-history":[{"count":1,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/2173\/revisions"}],"predecessor-version":[{"id":2174,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/2173\/revisions\/2174"}],"wp:attachment":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/media?parent=2173"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/categories?post=2173"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/tags?post=2173"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}