<?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>fragmented &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/fragmented/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, 15 Nov 2017 13:20:34 +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>SQL Server: Understanding the role of Extent</title>
		<link>https://www.dbrnd.com/2016/04/sql-server-understanding-the-role-of-extent/</link>
					<comments>https://www.dbrnd.com/2016/04/sql-server-understanding-the-role-of-extent/#comments</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sat, 16 Apr 2016 07:28:33 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[extent]]></category>
		<category><![CDATA[fragmented]]></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=2312</guid>

					<description><![CDATA[In the previous articles, I explained basic about the architecture of Data Files and Data Pages of the SQL Server. The SQL Server Extent is one type of storage unit, and it stores eight physical contiguous 8KB pages. Each extent size is 64KB and it can store 16 extents per megabyte. The eight data pages [&#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-understanding-the-role-of-extent%2F&amp;linkname=SQL%20Server%3A%20Understanding%20the%20role%20of%20Extent" 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-understanding-the-role-of-extent%2F&amp;linkname=SQL%20Server%3A%20Understanding%20the%20role%20of%20Extent" 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-understanding-the-role-of-extent%2F&amp;linkname=SQL%20Server%3A%20Understanding%20the%20role%20of%20Extent" 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-understanding-the-role-of-extent%2F&amp;linkname=SQL%20Server%3A%20Understanding%20the%20role%20of%20Extent" 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-understanding-the-role-of-extent%2F&amp;linkname=SQL%20Server%3A%20Understanding%20the%20role%20of%20Extent" 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-understanding-the-role-of-extent%2F&amp;linkname=SQL%20Server%3A%20Understanding%20the%20role%20of%20Extent" 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-understanding-the-role-of-extent%2F&#038;title=SQL%20Server%3A%20Understanding%20the%20role%20of%20Extent" data-a2a-url="https://www.dbrnd.com/2016/04/sql-server-understanding-the-role-of-extent/" data-a2a-title="SQL Server: Understanding the role of Extent"></a></p><p><em>In the previous articles, I explained basic about the architecture of <a href="https://www.dbrnd.com/2016/04/sql-server-the-internal-storage-architecture-of-the-database-files/" target="_blank"><strong>Data Files</strong></a> and <a href="https://www.dbrnd.com/2016/04/sql-server-the-internal-structure-of-the-data-page/" target="_blank"><strong>Data Pages</strong></a> of the SQL Server. </em></p>
<blockquote><p>The SQL Server Extent is one type of storage unit, and it stores eight physical contiguous 8KB pages.</p>
<p>Each extent size is 64KB and it can store 16 extents per megabyte.</p></blockquote>
<blockquote><p>The eight data pages are logically grouped into extents and extents is responsible to manage storage space for data pages.</p></blockquote>
<blockquote><p>As per my previous discussion, a single data page can never merge data from multiple tables.<br />
But SQL Server does not allocate whole extents to the particular table.</p></blockquote>
<p>There are two types of Extent, Uniform Extent and Mixed Extent.</p>
<blockquote><p><strong>Uniform Extent:</strong> This Extent basically for single user object and it stores all 8 data pages for a single user object. If our table has a large set of records, internally, it stores all 8 data pages into one Extent.</p></blockquote>
<blockquote><p><strong>Mixed Extent:</strong> This Extent owned by multiple user object and it stores 8 data pages may be for multiple user object. It can also combine different type of data pages into one extent.</p></blockquote>
<blockquote><p>When you first create a table SQL Server starts by allocating a data page to it from a Mixed Extent. Once the table has enough data to warrant a full extent, SQL Server will allocate a Uniform Extent to it.</p></blockquote>
<p><strong>Let me explain with the simple example:</strong></p>
<p><strong>First, create a table with sample records:</strong></p><pre class="crayon-plain-tag">CREATE TABLE tbl_TestPages(
   Name CHAR(8000)
)
GO

-- INSERT 50 Records
INSERT INTO tbl_TestPages VALUES('dbrnd.com')
GO 50</pre><p>
<p><strong>DBCC IND to check the information about allocated pages:</strong></p><pre class="crayon-plain-tag">DBCC IND('database_name','tbl_TestPages',1)</pre><p>
<p><strong>The Result:</strong></p>
<p><a href="https://www.dbrnd.com/wp-content/uploads/2016/04/SQLServerFragmentedPages.png" rel="attachment wp-att-2321"><img fetchpriority="high" decoding="async" class="alignnone wp-image-2321 size-full" title="SQL Server Fragmented Pages" src="https://www.dbrnd.com/wp-content/uploads/2016/04/SQLServerFragmentedPages.png" alt="SQL Server Fragmented Pages" width="704" height="304" srcset="https://www.dbrnd.com/wp-content/uploads/2016/04/SQLServerFragmentedPages.png 704w, https://www.dbrnd.com/wp-content/uploads/2016/04/SQLServerFragmentedPages-300x130.png 300w, https://www.dbrnd.com/wp-content/uploads/2016/04/SQLServerFragmentedPages-150x65.png 150w" sizes="(max-width: 704px) 100vw, 704px" /></a></p>
<p>You can find first 8 pages don&#8217;t have sequential PagePID because the first time it stored in a Mixed Extent mode. The second 8 pages have a sequential PagePID because the same table requires more 8KB pages.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2016/04/sql-server-understanding-the-role-of-extent/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
