<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>size &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/size/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbrnd.com</link>
	<description>BIGData &#124; NoSQL &#124; MSSQL &#124; MySQL &#124; PostgreSQL</description>
	<lastBuildDate>Wed, 18 Apr 2018 21:41:05 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.6</generator>
	<item>
		<title>Greenplum: How to check the Database Schema Size?</title>
		<link>https://www.dbrnd.com/2017/06/greenplum-how-to-check-the-database-schema-size-gp_toolkit-gp_size_of_schema_disk/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Thu, 29 Jun 2017 16:16:21 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[gp_size_of_schema_disk]]></category>
		<category><![CDATA[gp_toolkit]]></category>
		<category><![CDATA[Greenplum]]></category>
		<category><![CDATA[Greenplum Administrator]]></category>
		<category><![CDATA[Greenplum Error]]></category>
		<category><![CDATA[Greenplum Monitoring]]></category>
		<category><![CDATA[Greenplum Performance Tuning]]></category>
		<category><![CDATA[Greenplum Programming]]></category>
		<category><![CDATA[Greenplum Query]]></category>
		<category><![CDATA[Greenplum Tips and Tricks]]></category>
		<category><![CDATA[pg_namespace]]></category>
		<category><![CDATA[PostgreSQL 8.2]]></category>
		<category><![CDATA[schema]]></category>
		<category><![CDATA[size]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=5441</guid>

					<description><![CDATA[Greenplum is a based on MVCC architecture that means user&#8217;s action like UPDATE will insert a new record in a database. Greenplum Data warehouse can manage billions of data, but it doesn&#8217;t mean that user can generate or UPDATE random data set. Periodically, The Greenplum DBA should check the size of database schemas and their [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F06%2Fgreenplum-how-to-check-the-database-schema-size-gp_toolkit-gp_size_of_schema_disk%2F&amp;linkname=Greenplum%3A%20How%20to%20check%20the%20Database%20Schema%20Size%3F" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F06%2Fgreenplum-how-to-check-the-database-schema-size-gp_toolkit-gp_size_of_schema_disk%2F&amp;linkname=Greenplum%3A%20How%20to%20check%20the%20Database%20Schema%20Size%3F" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F06%2Fgreenplum-how-to-check-the-database-schema-size-gp_toolkit-gp_size_of_schema_disk%2F&amp;linkname=Greenplum%3A%20How%20to%20check%20the%20Database%20Schema%20Size%3F" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F06%2Fgreenplum-how-to-check-the-database-schema-size-gp_toolkit-gp_size_of_schema_disk%2F&amp;linkname=Greenplum%3A%20How%20to%20check%20the%20Database%20Schema%20Size%3F" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F06%2Fgreenplum-how-to-check-the-database-schema-size-gp_toolkit-gp_size_of_schema_disk%2F&amp;linkname=Greenplum%3A%20How%20to%20check%20the%20Database%20Schema%20Size%3F" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F06%2Fgreenplum-how-to-check-the-database-schema-size-gp_toolkit-gp_size_of_schema_disk%2F&amp;linkname=Greenplum%3A%20How%20to%20check%20the%20Database%20Schema%20Size%3F" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F06%2Fgreenplum-how-to-check-the-database-schema-size-gp_toolkit-gp_size_of_schema_disk%2F&#038;title=Greenplum%3A%20How%20to%20check%20the%20Database%20Schema%20Size%3F" data-a2a-url="https://www.dbrnd.com/2017/06/greenplum-how-to-check-the-database-schema-size-gp_toolkit-gp_size_of_schema_disk/" data-a2a-title="Greenplum: How to check the Database Schema Size?"></a></p><p>Greenplum is a based on MVCC architecture that means user&#8217;s action like UPDATE will insert a new record in a database.<br />
Greenplum Data warehouse can manage billions of data, but it doesn&#8217;t mean that user can generate or UPDATE random data set.<br />
Periodically, The Greenplum DBA should check the size of database schemas and their appropriate usage.</p>
<p>In this post, I shared different scripts to check the size of Greenplum Database Schemas.</p>
<p><strong>Option 1:</strong></p>
<pre class="crayon-plain-tag">select *
from gp_toolkit.gp_size_of_schema_disk;</pre> </p>
<p><strong>Option 2:</strong></p>
<pre class="crayon-plain-tag">select
	schemaname
	,round(sum(pg_total_relation_size(schemaname||'.'||tablename))) SchemaSize
from pg_tables group by 1;</pre> </p>
<p><strong>Option 3:</strong></p>
<pre class="crayon-plain-tag">SELECT
	schema_name
	,pg_size_pretty(sum(table_size)::bigint)
FROM
(
	SELECT pg_catalog.pg_namespace.nspname as schema_name,
	pg_relation_size(pg_catalog.pg_class.oid) as table_size
	FROM pg_catalog.pg_class
	JOIN pg_catalog.pg_namespace ON relnamespace = pg_catalog.pg_namespace.oid
) t
GROUP BY schema_name
ORDER BY schema_name;</pre> </p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>PostgreSQL: Script to find size of all Databases of Server</title>
		<link>https://www.dbrnd.com/2017/01/postgresql-script-to-find-size-of-all-databases-of-server-for-reporting-monitoring/</link>
					<comments>https://www.dbrnd.com/2017/01/postgresql-script-to-find-size-of-all-databases-of-server-for-reporting-monitoring/#comments</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Wed, 18 Jan 2017 20:46:12 +0000</pubDate>
				<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[PostgreSQL DBA Script]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database administrator]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[database size]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[pg_catalog]]></category>
		<category><![CDATA[pg_database]]></category>
		<category><![CDATA[plpgsql]]></category>
		<category><![CDATA[Postgres Query]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[PostgreSQL Administrator]]></category>
		<category><![CDATA[PostgreSQL Error]]></category>
		<category><![CDATA[PostgreSQL Programming]]></category>
		<category><![CDATA[PostgreSQL Tips and Tricks]]></category>
		<category><![CDATA[size]]></category>
		<category><![CDATA[SQL Script]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3650</guid>

					<description><![CDATA[In this post, I am sharing one SQL Script to find the size of all your PostgreSQL Databases. I am sharing this kind of script because It helps a lot for reporting and monitoring Database Server. Recently, I have used this script to generate all database size reports because suddenly one of our PostgreSQL Server [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F01%2Fpostgresql-script-to-find-size-of-all-databases-of-server-for-reporting-monitoring%2F&amp;linkname=PostgreSQL%3A%20Script%20to%20find%20size%20of%20all%20Databases%20of%20Server" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F01%2Fpostgresql-script-to-find-size-of-all-databases-of-server-for-reporting-monitoring%2F&amp;linkname=PostgreSQL%3A%20Script%20to%20find%20size%20of%20all%20Databases%20of%20Server" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F01%2Fpostgresql-script-to-find-size-of-all-databases-of-server-for-reporting-monitoring%2F&amp;linkname=PostgreSQL%3A%20Script%20to%20find%20size%20of%20all%20Databases%20of%20Server" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F01%2Fpostgresql-script-to-find-size-of-all-databases-of-server-for-reporting-monitoring%2F&amp;linkname=PostgreSQL%3A%20Script%20to%20find%20size%20of%20all%20Databases%20of%20Server" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F01%2Fpostgresql-script-to-find-size-of-all-databases-of-server-for-reporting-monitoring%2F&amp;linkname=PostgreSQL%3A%20Script%20to%20find%20size%20of%20all%20Databases%20of%20Server" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F01%2Fpostgresql-script-to-find-size-of-all-databases-of-server-for-reporting-monitoring%2F&amp;linkname=PostgreSQL%3A%20Script%20to%20find%20size%20of%20all%20Databases%20of%20Server" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F01%2Fpostgresql-script-to-find-size-of-all-databases-of-server-for-reporting-monitoring%2F&#038;title=PostgreSQL%3A%20Script%20to%20find%20size%20of%20all%20Databases%20of%20Server" data-a2a-url="https://www.dbrnd.com/2017/01/postgresql-script-to-find-size-of-all-databases-of-server-for-reporting-monitoring/" data-a2a-title="PostgreSQL: Script to find size of all Databases of Server"></a></p><p>In this post, I am sharing one SQL Script to find the size of all your PostgreSQL Databases. </p>
<p>I am sharing this kind of script because It helps a lot for reporting and monitoring Database Server. </p>
<blockquote><p>Recently, I have used this script to generate all database size reports because suddenly one of our PostgreSQL Server increased utilization of the Disk. </p></blockquote>
<p>Using pg_catalog.pg_database, I am finding the size of Databases.<br />
<strong>Below is a script:</strong></p>
<pre class="crayon-plain-tag">SELECT 
	datname AS DatabaseName
	,pg_catalog.pg_get_userbyid(datdba) AS OwnerName
	,CASE 
		WHEN pg_catalog.has_database_privilege(datname, 'CONNECT')
		THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(datname))
		ELSE 'No Access For You'
	END AS DatabaseSize
FROM pg_catalog.pg_database
ORDER BY 
	CASE 
		WHEN pg_catalog.has_database_privilege(datname, 'CONNECT')
		THEN pg_catalog.pg_database_size(datname)
		ELSE NULL
	END DESC;</pre> </p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2017/01/postgresql-script-to-find-size-of-all-databases-of-server-for-reporting-monitoring/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>SQL Server: Script to find the size of Database Files and Log Files</title>
		<link>https://www.dbrnd.com/2015/11/sql-server-script-to-find-the-size-of-database-files-and-log-files/</link>
					<comments>https://www.dbrnd.com/2015/11/sql-server-script-to-find-the-size-of-database-files-and-log-files/#comments</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Wed, 18 Nov 2015 17:18:41 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server DBA Script]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[size]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=1036</guid>

					<description><![CDATA[In this post, I am sharing a SQL Script to find the size of Database Files and Log Files in SQL Server. I am calculating the size using sys.master_files and performing the required division to get size in MB and GB because it is returning 8 KB pages. The Database Administrator can use this script [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F11%2Fsql-server-script-to-find-the-size-of-database-files-and-log-files%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20find%20the%20size%20of%20Database%20Files%20and%20Log%20Files" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F11%2Fsql-server-script-to-find-the-size-of-database-files-and-log-files%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20find%20the%20size%20of%20Database%20Files%20and%20Log%20Files" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F11%2Fsql-server-script-to-find-the-size-of-database-files-and-log-files%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20find%20the%20size%20of%20Database%20Files%20and%20Log%20Files" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F11%2Fsql-server-script-to-find-the-size-of-database-files-and-log-files%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20find%20the%20size%20of%20Database%20Files%20and%20Log%20Files" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F11%2Fsql-server-script-to-find-the-size-of-database-files-and-log-files%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20find%20the%20size%20of%20Database%20Files%20and%20Log%20Files" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F11%2Fsql-server-script-to-find-the-size-of-database-files-and-log-files%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20find%20the%20size%20of%20Database%20Files%20and%20Log%20Files" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F11%2Fsql-server-script-to-find-the-size-of-database-files-and-log-files%2F&#038;title=SQL%20Server%3A%20Script%20to%20find%20the%20size%20of%20Database%20Files%20and%20Log%20Files" data-a2a-url="https://www.dbrnd.com/2015/11/sql-server-script-to-find-the-size-of-database-files-and-log-files/" data-a2a-title="SQL Server: Script to find the size of Database Files and Log Files"></a></p><p>In this post, I am sharing a SQL Script to find the size of Database Files and Log Files in SQL Server. </p>
<p>I am calculating the size using sys.master_files and performing the required division to get size in MB and GB because it is returning 8 KB pages. </p>
<p>The Database Administrator can use this script to get the quick size of Database Files and Log Files of a SQL Server.<br />
SQL Server Management Studio also provides GUI tools for this exercise, but still, I always use a different script to do my DBA task. </p>
<pre class="crayon-plain-tag">SELECT 
    db_name(database_id) AS DatabaseName
    ,type_desc AS TypeDesc
    ,(size * 8) /1024 AS SizeInMB
    ,(size * 8) /1024/1024 AS SizeInGB
FROM sys.master_files 
ORDER BY name</pre> </p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2015/11/sql-server-script-to-find-the-size-of-database-files-and-log-files/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
