<?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>compression &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/compression/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>Fri, 15 Dec 2017 19:59:21 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.4</generator>
	<item>
		<title>PostgreSQL: How to take Compressed Backup of Database?</title>
		<link>https://www.dbrnd.com/2017/12/postgresql-how-to-take-compressed-backup-of-database-pg_dump/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Fri, 22 Dec 2017 16:16:59 +0000</pubDate>
				<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[compressed backup]]></category>
		<category><![CDATA[compression]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[pg_dump]]></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 Monitoring]]></category>
		<category><![CDATA[PostgreSQL Performance Tuning]]></category>
		<category><![CDATA[PostgreSQL Programming]]></category>
		<category><![CDATA[PostgreSQL Tips and Tricks]]></category>
		<category><![CDATA[zlib compression]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=6871</guid>

					<description><![CDATA[In this post, I am sharing few options of pg_dump for taking the compressed backup in PostgreSQL. When your database size is increasing, you should demand compressed backup for saving the disk space and time both. Few OSs also not supported the big size of the single file so we have to split the backup [&#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%2F12%2Fpostgresql-how-to-take-compressed-backup-of-database-pg_dump%2F&amp;linkname=PostgreSQL%3A%20How%20to%20take%20Compressed%20Backup%20of%20Database%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%2F12%2Fpostgresql-how-to-take-compressed-backup-of-database-pg_dump%2F&amp;linkname=PostgreSQL%3A%20How%20to%20take%20Compressed%20Backup%20of%20Database%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%2F12%2Fpostgresql-how-to-take-compressed-backup-of-database-pg_dump%2F&amp;linkname=PostgreSQL%3A%20How%20to%20take%20Compressed%20Backup%20of%20Database%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%2F12%2Fpostgresql-how-to-take-compressed-backup-of-database-pg_dump%2F&amp;linkname=PostgreSQL%3A%20How%20to%20take%20Compressed%20Backup%20of%20Database%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%2F12%2Fpostgresql-how-to-take-compressed-backup-of-database-pg_dump%2F&amp;linkname=PostgreSQL%3A%20How%20to%20take%20Compressed%20Backup%20of%20Database%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%2F12%2Fpostgresql-how-to-take-compressed-backup-of-database-pg_dump%2F&amp;linkname=PostgreSQL%3A%20How%20to%20take%20Compressed%20Backup%20of%20Database%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%2F12%2Fpostgresql-how-to-take-compressed-backup-of-database-pg_dump%2F&#038;title=PostgreSQL%3A%20How%20to%20take%20Compressed%20Backup%20of%20Database%3F" data-a2a-url="https://www.dbrnd.com/2017/12/postgresql-how-to-take-compressed-backup-of-database-pg_dump/" data-a2a-title="PostgreSQL: How to take Compressed Backup of Database?"></a></p><p>In this post, I am sharing few options of pg_dump for taking the compressed backup in PostgreSQL. </p>
<p>When your database size is increasing, you should demand compressed backup for saving the disk space and time both. </p>
<p>Few OSs also not supported the big size of the single file so we have to split the backup file into different files or we can go with compressed options. </p>
<blockquote><p>PostgreSQL supports zlib compression. We can use -Fc option in pg_dump for taking a compressed backup, and it also has an advantage like we can restore table selectively.</p></blockquote>
<p><strong>Syntax:</strong></p>
<pre class="crayon-plain-tag">pg_dump -Fc dbname &gt; filename</pre> </p>
<p><strong>Use pg_restore for restoring the database:</strong></p>
<pre class="crayon-plain-tag">pg_restore -d dbname filename</pre> </p>
<p><strong>We can also use gzip option for compression:</strong></p>
<pre class="crayon-plain-tag">pg_dump dbname | gzip &gt; filename.gz</pre> </p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>MySQL: InnoDB Table Compression, How we can Compressed Table?</title>
		<link>https://www.dbrnd.com/2017/04/mysql-innodb-table-compression-how-we-can-compressed-table-using-row_format-compressed/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sat, 01 Apr 2017 16:16:50 +0000</pubDate>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[Barracuda]]></category>
		<category><![CDATA[compression]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[InnoDB Compressed Table]]></category>
		<category><![CDATA[innodb_file_per_table]]></category>
		<category><![CDATA[MySQL Command]]></category>
		<category><![CDATA[MySQL Database Administrator]]></category>
		<category><![CDATA[MySQL Database Designing]]></category>
		<category><![CDATA[MySQL Database Programming]]></category>
		<category><![CDATA[MySQL Error]]></category>
		<category><![CDATA[MySQL Performance Tunning]]></category>
		<category><![CDATA[MySQL Query]]></category>
		<category><![CDATA[MySQL Tips and Tricks]]></category>
		<category><![CDATA[reduce size]]></category>
		<category><![CDATA[zlib]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3752</guid>

					<description><![CDATA[MySQL InnoDB Engine Table Compression, which reduces the size of database size, reduces the CPU I/O and improve overall throughput time. The compressed data requires the small size of pages, compare to uncompressed data. MySQL implements compression with the help of the well-known zlib library, which implements the LZ77 compression algorithm. This compression algorithm is [&#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%2F04%2Fmysql-innodb-table-compression-how-we-can-compressed-table-using-row_format-compressed%2F&amp;linkname=MySQL%3A%20InnoDB%20Table%20Compression%2C%20How%20we%20can%20Compressed%20Table%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%2F04%2Fmysql-innodb-table-compression-how-we-can-compressed-table-using-row_format-compressed%2F&amp;linkname=MySQL%3A%20InnoDB%20Table%20Compression%2C%20How%20we%20can%20Compressed%20Table%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%2F04%2Fmysql-innodb-table-compression-how-we-can-compressed-table-using-row_format-compressed%2F&amp;linkname=MySQL%3A%20InnoDB%20Table%20Compression%2C%20How%20we%20can%20Compressed%20Table%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%2F04%2Fmysql-innodb-table-compression-how-we-can-compressed-table-using-row_format-compressed%2F&amp;linkname=MySQL%3A%20InnoDB%20Table%20Compression%2C%20How%20we%20can%20Compressed%20Table%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%2F04%2Fmysql-innodb-table-compression-how-we-can-compressed-table-using-row_format-compressed%2F&amp;linkname=MySQL%3A%20InnoDB%20Table%20Compression%2C%20How%20we%20can%20Compressed%20Table%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%2F04%2Fmysql-innodb-table-compression-how-we-can-compressed-table-using-row_format-compressed%2F&amp;linkname=MySQL%3A%20InnoDB%20Table%20Compression%2C%20How%20we%20can%20Compressed%20Table%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%2F04%2Fmysql-innodb-table-compression-how-we-can-compressed-table-using-row_format-compressed%2F&#038;title=MySQL%3A%20InnoDB%20Table%20Compression%2C%20How%20we%20can%20Compressed%20Table%3F" data-a2a-url="https://www.dbrnd.com/2017/04/mysql-innodb-table-compression-how-we-can-compressed-table-using-row_format-compressed/" data-a2a-title="MySQL: InnoDB Table Compression, How we can Compressed Table?"></a></p><p>MySQL InnoDB Engine Table Compression, which reduces the size of database size, reduces the CPU I/O and improve overall throughput time. </p>
<blockquote><p>The compressed data requires the small size of pages, compare to uncompressed data.<br />
MySQL implements compression with the help of the well-known zlib library, which implements the LZ77 compression algorithm. </p></blockquote>
<blockquote><p>This compression algorithm is mature, robust, and efficient in both CPU utilization and in a reduction of data size.
</p></blockquote>
<blockquote><p>Because of compressed data, processors and cache memories increases the speed of execution.<br />
Internally buffer pool fetches the compressed data, uncompressed that data, perform the operation and again write compressed data into Disk. </p></blockquote>
<blockquote><p>The default uncompressed size of InnoDB data pages is 16KB.
</p></blockquote>
<blockquote><p>If innodb_file_per_table variable enable, only we can create compressed table.</p></blockquote>
<blockquote><p>For InnoDB system tablespace, we cannot create compressed table because the single InnoDB ibdata1 file also contains other metadata information which we cannot compress.</p></blockquote>
<p>You can access below articles for more details on InnoDB data files. </p>
<blockquote data-secret="Ssd4fANOAm" class="wp-embedded-content"><p><a href="https://www.dbrnd.com/2016/09/mysql-why-innodb-engine-stores-all-databases-in-one-file-ibdata1/">MySQL: Why InnoDB Engine stores all databases in one file (ibdata1)?</a></p></blockquote>
<p><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2016/09/mysql-why-innodb-engine-stores-all-databases-in-one-file-ibdata1/embed/#?secret=Ssd4fANOAm" data-secret="Ssd4fANOAm" width="600" height="338" title="&#8220;MySQL: Why InnoDB Engine stores all databases in one file (ibdata1)?&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<blockquote data-secret="DLuloQYMoV" class="wp-embedded-content"><p><a href="https://www.dbrnd.com/2016/09/mysql-the-truth-about-innodb-file-per-table-tablespaces/">MySQL: The Truth about InnoDB File Per Table Tablespaces</a></p></blockquote>
<p><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2016/09/mysql-the-truth-about-innodb-file-per-table-tablespaces/embed/#?secret=DLuloQYMoV" data-secret="DLuloQYMoV" width="600" height="338" title="&#8220;MySQL: The Truth about InnoDB File Per Table Tablespaces&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<blockquote><p>Mostly, we should enable compression for a read-intensive type of application where RAM frequently uses data.<br />
The default uncompressed size of InnoDB data pages is 16KB and Depending on the combination of option values, MySQL uses a page size of 1KB, 2KB, 4KB, 8KB, or 16KB for the tablespace data file (.ibd file).</p></blockquote>
<p><strong>How to create an InnoDB Compressed Table?</strong><br />
First In my.cnf or my.ini, innodb_file_per_table required to enable and innodb_file_format must be set to Barracuda.</p>
<pre class="crayon-plain-tag">SET GLOBAL innodb_file_per_table=1;
SET GLOBAL innodb_file_format=Barracuda;</pre> </p>
<p>We can create a table with an ROW_FORMAT=COMPRESSED option, which set compressed value half of the innodb_page_size variable.<br />
Explicitly, we can also set a KEY_BLOCK_SIZE value to give a hint.<br />
Here, You can check the size of innodb_page_size. (default 16KB)</p>
<pre class="crayon-plain-tag">SHOW VARIABLES LIKE 'innodb_page_size';</pre> </p>
<p><strong>Create Sample InnoDB Compress Table (Set to 8KB):</strong></p>
<pre class="crayon-plain-tag">CREATE TABLE tbl_CompressedTable
(
	CID INT PRIMARY KEY
	,CName VARCHAR(50)
)
ROW_FORMAT=COMPRESSED
KEY_BLOCK_SIZE=8;</pre> </p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
