<?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>innodb_file_per_table &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/innodb_file_per_table/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>Sat, 01 Apr 2017 18:41:00 +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>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>
		<item>
		<title>MySQL: The Truth about InnoDB File Per Table Tablespaces</title>
		<link>https://www.dbrnd.com/2016/09/mysql-the-truth-about-innodb-file-per-table-tablespaces/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Wed, 21 Sep 2016 16:16:48 +0000</pubDate>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[innodb]]></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>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=1715</guid>

					<description><![CDATA[In this post, I am going to discuss MySQL InnoDB File-Per-Table tablespaces. What are the advantages and disadvantages? How to enable and disable it? By default, The InnoDB stores tables and indexes into the system tablespace. If we want to create separate .idb and .frm file for each table, we should enable innodb_file_per_table. How to [&#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%2F2016%2F09%2Fmysql-the-truth-about-innodb-file-per-table-tablespaces%2F&amp;linkname=MySQL%3A%20The%20Truth%20about%20InnoDB%20File%20Per%20Table%20Tablespaces" 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%2F2016%2F09%2Fmysql-the-truth-about-innodb-file-per-table-tablespaces%2F&amp;linkname=MySQL%3A%20The%20Truth%20about%20InnoDB%20File%20Per%20Table%20Tablespaces" 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%2F2016%2F09%2Fmysql-the-truth-about-innodb-file-per-table-tablespaces%2F&amp;linkname=MySQL%3A%20The%20Truth%20about%20InnoDB%20File%20Per%20Table%20Tablespaces" 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%2F2016%2F09%2Fmysql-the-truth-about-innodb-file-per-table-tablespaces%2F&amp;linkname=MySQL%3A%20The%20Truth%20about%20InnoDB%20File%20Per%20Table%20Tablespaces" 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%2F2016%2F09%2Fmysql-the-truth-about-innodb-file-per-table-tablespaces%2F&amp;linkname=MySQL%3A%20The%20Truth%20about%20InnoDB%20File%20Per%20Table%20Tablespaces" 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%2F2016%2F09%2Fmysql-the-truth-about-innodb-file-per-table-tablespaces%2F&amp;linkname=MySQL%3A%20The%20Truth%20about%20InnoDB%20File%20Per%20Table%20Tablespaces" 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%2F2016%2F09%2Fmysql-the-truth-about-innodb-file-per-table-tablespaces%2F&#038;title=MySQL%3A%20The%20Truth%20about%20InnoDB%20File%20Per%20Table%20Tablespaces" data-a2a-url="https://www.dbrnd.com/2016/09/mysql-the-truth-about-innodb-file-per-table-tablespaces/" data-a2a-title="MySQL: The Truth about InnoDB File Per Table Tablespaces"></a></p><p>In this post, I am going to discuss MySQL InnoDB File-Per-Table tablespaces.<br />
What are the advantages and disadvantages? How to enable and disable it?</p>
<blockquote><p>By default, The InnoDB stores tables and indexes into the system tablespace. If we want to create separate .idb and .frm file for each table, we should enable innodb_file_per_table.</p></blockquote>
<p><strong>How to Enable and Disable Innodb_file_per_table?</strong></p>
<p><strong>To Enable:</strong><br />
Add below line into [mysqld] section of my.cnf file and restart the MySQL Server. It will create two separate file for each table, .idb file for data and .frm file for table definition.</p><pre class="crayon-plain-tag">[mysqld]
innodb_file_per_table=1</pre><p>
</p><pre class="crayon-plain-tag">-- We can also run this command and restart MySQL Server. 
SET GLOBAL innodb_file_per_table=1;</pre><p> </p>
<p><strong>To Disable: </strong><br />
Simply, you can remove innodb_file_per_table line from my.cnf and restart the server. Now newly created table stores into common tablespace (ibdata1).</p>
<p><strong>Advantages to enable innodb_file_per_table:</strong></p>
<ul>
<li>The Truncate Table operation runs faster when we have separate.idb file.</li>
<li>We can reclaim disk space by truncating and dropping a single table. On the other side, with the single table space we can use this free space only for new InnoDB data.</li>
<li>We can easily run OPTIMIZE TABLE on individual Table files.</li>
<li>We can easily store and move individual table.</li>
<li>We can use features like compressed and dynamic row formats.</li>
<li>We can quickly perform backup and restore of individual tables.</li>
</ul>
<p><strong>Disadvantages to enable innodb_file_per_table:</strong></p>
<ul>
<li>The management of each different file is very difficult and time taking exercise.</li>
<li>Each different file has unused space so we require to perform OPTIMIZE TABLE on each individual file.</li>
<li>Mysqld has to open file handler per table, which may reduce the performance of MySQL Server.</li>
<li>For every action of each file buffer pool is scanned, which reduce the performance of MySQL Server.</li>
</ul>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
