<?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>8KB Data Page &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/8kb-data-page/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>Tue, 14 Nov 2017 11:30:51 +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: What is TOAST (The Oversized-Attribute Storage Technique)</title>
		<link>https://www.dbrnd.com/2016/10/postgresql-what-is-toast-the-oversized-attribute-storage-technique-exceed-8-kb-data-page-size-extended-storage/</link>
					<comments>https://www.dbrnd.com/2016/10/postgresql-what-is-toast-the-oversized-attribute-storage-technique-exceed-8-kb-data-page-size-extended-storage/#comments</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Fri, 07 Oct 2016 16:16:03 +0000</pubDate>
				<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[8KB Data Page]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[encrypted storage]]></category>
		<category><![CDATA[overflow size]]></category>
		<category><![CDATA[Oversized-Attribute Storage Technique]]></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[Storage]]></category>
		<category><![CDATA[TOAST]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3648</guid>

					<description><![CDATA[Like SQL Server, PostgreSQL data page size is also 8KB. This post is very similar to a few of the SQL Server published articles. SQL Server: The Internal Structure of the Data Page SQL Server: What happened, when Row Overflow and Data Exceeding 8KB? PostgreSQL uses 8kb fixed size data page to store tuples of [&#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%2F10%2Fpostgresql-what-is-toast-the-oversized-attribute-storage-technique-exceed-8-kb-data-page-size-extended-storage%2F&amp;linkname=PostgreSQL%3A%20What%20is%20TOAST%20%28The%20Oversized-Attribute%20Storage%20Technique%29" 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%2F10%2Fpostgresql-what-is-toast-the-oversized-attribute-storage-technique-exceed-8-kb-data-page-size-extended-storage%2F&amp;linkname=PostgreSQL%3A%20What%20is%20TOAST%20%28The%20Oversized-Attribute%20Storage%20Technique%29" 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%2F10%2Fpostgresql-what-is-toast-the-oversized-attribute-storage-technique-exceed-8-kb-data-page-size-extended-storage%2F&amp;linkname=PostgreSQL%3A%20What%20is%20TOAST%20%28The%20Oversized-Attribute%20Storage%20Technique%29" 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%2F10%2Fpostgresql-what-is-toast-the-oversized-attribute-storage-technique-exceed-8-kb-data-page-size-extended-storage%2F&amp;linkname=PostgreSQL%3A%20What%20is%20TOAST%20%28The%20Oversized-Attribute%20Storage%20Technique%29" 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%2F10%2Fpostgresql-what-is-toast-the-oversized-attribute-storage-technique-exceed-8-kb-data-page-size-extended-storage%2F&amp;linkname=PostgreSQL%3A%20What%20is%20TOAST%20%28The%20Oversized-Attribute%20Storage%20Technique%29" 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%2F10%2Fpostgresql-what-is-toast-the-oversized-attribute-storage-technique-exceed-8-kb-data-page-size-extended-storage%2F&amp;linkname=PostgreSQL%3A%20What%20is%20TOAST%20%28The%20Oversized-Attribute%20Storage%20Technique%29" 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%2F10%2Fpostgresql-what-is-toast-the-oversized-attribute-storage-technique-exceed-8-kb-data-page-size-extended-storage%2F&#038;title=PostgreSQL%3A%20What%20is%20TOAST%20%28The%20Oversized-Attribute%20Storage%20Technique%29" data-a2a-url="https://www.dbrnd.com/2016/10/postgresql-what-is-toast-the-oversized-attribute-storage-technique-exceed-8-kb-data-page-size-extended-storage/" data-a2a-title="PostgreSQL: What is TOAST (The Oversized-Attribute Storage Technique)"></a></p><p>Like SQL Server, PostgreSQL data page size is also 8KB. </p>
<p>This post is very similar to a few of the SQL Server published articles.</p>
<blockquote class="wp-embedded-content" data-secret="rGrP0nx5zq"><p><a href="https://www.dbrnd.com/2016/04/sql-server-the-internal-structure-of-the-data-page/">SQL Server: The Internal Structure of the Data Page</a></p></blockquote>
<p><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2016/04/sql-server-the-internal-structure-of-the-data-page/embed/#?secret=rGrP0nx5zq" data-secret="rGrP0nx5zq" width="600" height="338" title="&#8220;SQL Server: The Internal Structure of the Data Page&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<blockquote class="wp-embedded-content" data-secret="Tib7ndboIQ"><p><a href="https://www.dbrnd.com/2016/04/sql-server-what-happened-when-row-overflow-and-data-exceeding-8kb/">SQL Server: What happened, when Row Overflow and Data Exceeding 8KB?</a></p></blockquote>
<p><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2016/04/sql-server-what-happened-when-row-overflow-and-data-exceeding-8kb/embed/#?secret=Tib7ndboIQ" data-secret="Tib7ndboIQ" width="600" height="338" title="&#8220;SQL Server: What happened, when Row Overflow and Data Exceeding 8KB?&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<blockquote><p>PostgreSQL uses 8kb fixed size data page to store tuples of Table.</p></blockquote>
<blockquote><p>It does not allow tuples to span in multiple pages because not possible to store large field value directly into the 8kb page.<br />
This is one type of limitation of PostgreSQL. </p></blockquote>
<p><strong>What is TOAST (The Oversized-Attribute Storage Technique)?</strong></p>
<blockquote><p>The TOAST is one type of Technique to store and manage oversized or overflow data pages.</p></blockquote>
<blockquote><p>This is a background process of PostgreSQL, and It also compresses the value and broken into multiple physical pages.</p></blockquote>
<blockquote><p>If row size is exceeding in the main table, It creates new a TOAST table to manage and store oversized rows. </p></blockquote>
<blockquote><p>The mechanism is accomplished by splitting up the large column entry into 2KB bytes and storing them as chunks in the TOAST tables.<br />
It then stores the length and a pointer to the TOAST entry back where the column stored. </p></blockquote>
<blockquote><p>Because of how the pointer system implemented, most TOAST table column types limited to a max size of 1GB.</p></blockquote>
<blockquote><p>The advantage of TOAST table is, whenever data require fetching from TOAST table, only It needs to refer TOAST table otherwise, It does not call unnecessary. </p></blockquote>
<p><strong>How to find whether a TOAST table is associated with your main tables?</strong></p>
<blockquote><p>You can easily select reltoastrelid from pg_class. Like any other table ObjectID is also assigned to TOAST Table.</p></blockquote>
<p><strong>You can execute below script:</strong></p>
<pre class="crayon-plain-tag">SELECT relname,reltoastrelid 
FROM pg_class 
WHERE relname='Table_Name';</pre> </p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2016/10/postgresql-what-is-toast-the-oversized-attribute-storage-technique-exceed-8-kb-data-page-size-extended-storage/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>SQL Server: The Internal Structure of the Data Page</title>
		<link>https://www.dbrnd.com/2016/04/sql-server-the-internal-structure-of-the-data-page/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Wed, 13 Apr 2016 20:07:15 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[8KB Data Page]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[Data File]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></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=2282</guid>

					<description><![CDATA[The Page in a SQL Server is a small storage unit of data and it resides in a Data File. When we write the first row in a table, it creates an 8KB page to store the data, and it assigns 0 as a starting number and sequentially increase in a data file. Each data [&#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%2F04%2Fsql-server-the-internal-structure-of-the-data-page%2F&amp;linkname=SQL%20Server%3A%20The%20Internal%20Structure%20of%20the%20Data%20Page" 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%2F04%2Fsql-server-the-internal-structure-of-the-data-page%2F&amp;linkname=SQL%20Server%3A%20The%20Internal%20Structure%20of%20the%20Data%20Page" 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%2F04%2Fsql-server-the-internal-structure-of-the-data-page%2F&amp;linkname=SQL%20Server%3A%20The%20Internal%20Structure%20of%20the%20Data%20Page" 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%2F04%2Fsql-server-the-internal-structure-of-the-data-page%2F&amp;linkname=SQL%20Server%3A%20The%20Internal%20Structure%20of%20the%20Data%20Page" 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%2F04%2Fsql-server-the-internal-structure-of-the-data-page%2F&amp;linkname=SQL%20Server%3A%20The%20Internal%20Structure%20of%20the%20Data%20Page" 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%2F04%2Fsql-server-the-internal-structure-of-the-data-page%2F&amp;linkname=SQL%20Server%3A%20The%20Internal%20Structure%20of%20the%20Data%20Page" 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%2F04%2Fsql-server-the-internal-structure-of-the-data-page%2F&#038;title=SQL%20Server%3A%20The%20Internal%20Structure%20of%20the%20Data%20Page" data-a2a-url="https://www.dbrnd.com/2016/04/sql-server-the-internal-structure-of-the-data-page/" data-a2a-title="SQL Server: The Internal Structure of the Data Page"></a></p><blockquote><p>The Page in a SQL Server is a small storage unit of data and it resides in a <a href="https://www.dbrnd.com/2016/04/sql-server-the-internal-storage-architecture-of-the-database-files/" target="_blank"><strong>Data File</strong></a>. </p>
<p>When we write the first row in a table, it creates an 8KB page to store the data, and it assigns 0 as a starting number and sequentially increase in a data file.</p></blockquote>
<blockquote><p>Each data file has a unique file ID number, and each page has a unique page number.<br />
We can store 128 pages per one megabyte.</p></blockquote>
<blockquote><p>The 8KB page doesn&#8217;t associate with a single row of data.<br />
If row size is small, multiple rows can store into an 8KB data page. If row size is large and 8KB page is not sufficient to store it, it creates multiple pages.</p></blockquote>
<blockquote><p>Each table has a separate data page, and it never merges data<br />
from multiple tables. Even if we have small size of the table, it also creates separate pages for each table.</p></blockquote>
<p>SQL Server uses different types of pages to store various types of data like Index, Data, Text, BLOB.</p>
<p><strong>The different type of pages are:</strong></p>
<blockquote><p><strong>Data:</strong> stores user&#8217;s data, but type of text, ntext, nvarchar(max),varchar(max),varbinary(max),xml, and image.</p>
<p><strong>Index:</strong> stores index related data.</p>
<p><strong>Text/Image: </strong>stores all large object data type like text,varchar(max).</p>
<p><strong>GAM:</strong> stores global allocation map information about extents.</p>
<p><strong>Page Free Space:</strong> stores information about the free space of the pages.</p>
<p><strong>IAM: </strong>stores index allocation map information about the indexes.</p>
<p><strong>BCM:</strong> stores bulk changed map information of the extents.</p></blockquote>
<p><strong>The internal structure of the Page:</strong></p>
<p><a href="https://www.dbrnd.com/wp-content/uploads/2016/04/SQLServerDataPageStructure.jpg" rel="attachment wp-att-2478"><img fetchpriority="high" decoding="async" class="alignright wp-image-2478 size-medium" title="SQL Server Data Page Structure" src="https://www.dbrnd.com/wp-content/uploads/2016/04/SQLServerDataPageStructure-261x300.jpg" alt="SQL Server Data Page Structure" width="261" height="300" srcset="https://www.dbrnd.com/wp-content/uploads/2016/04/SQLServerDataPageStructure-261x300.jpg 261w, https://www.dbrnd.com/wp-content/uploads/2016/04/SQLServerDataPageStructure-768x881.jpg 768w, https://www.dbrnd.com/wp-content/uploads/2016/04/SQLServerDataPageStructure-892x1024.jpg 892w, https://www.dbrnd.com/wp-content/uploads/2016/04/SQLServerDataPageStructure-750x861.jpg 750w, https://www.dbrnd.com/wp-content/uploads/2016/04/SQLServerDataPageStructure-150x172.jpg 150w" sizes="(max-width: 261px) 100vw, 261px" /></a></p>
<blockquote><p>A Data Page consists of three main sections which are Page Header, Actual Data and Row offsets.</p></blockquote>
<blockquote><p>Each Data Page has 96-byte header to store system information like page number, page type, free space, page owner&#8217;s object id.</p>
<p>After the header information, actual data rows are put on the page serially.</p>
<p>There is one-row offset table at the end of the page, and it stores information about each row.</p></blockquote>
<blockquote><p>The records within a page are not always stored in continuous logical order, and the free-space on a page is not always maintained in one contiguous block.</p></blockquote>
<blockquote><p>If we delete a record, it creates one free hole within the page, and immediately it cannot be used by new INSERT.</p>
<p>It creates fragmentation on a page and when it is necessary, INSERT check the free block and try to insert best match record into that free block.</p>
<p><em>This all row&#8217;s information kept by the Row offset table.<br />
The Database Administrator also has to perform some maintenance task to remove fragmentation from the data pages. </em></p></blockquote>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
