﻿<?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>Indekslerin Kapladığı Yeri Hesaplamak &#8211; SQL Server Eğitimleri</title>
	<atom:link href="https://sqlserveregitimleri.com/etiket/indekslerin-kapladigi-yeri-hesaplamak/feed" rel="self" type="application/rss+xml" />
	<link>https://sqlserveregitimleri.com</link>
	<description>SQL Server ile ilgili her şey</description>
	<lastBuildDate>Sat, 04 Mar 2023 17:13:36 +0000</lastBuildDate>
	<language>tr</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.1</generator>
	<item>
		<title>SQL Server’da Tablo ve Index&#8217;lerin Kapladığı Yeri Hesaplamak</title>
		<link>https://sqlserveregitimleri.com/sql-serverda-tablo-ve-indexlerin-kapladigi-yeri-hesaplamak</link>
		
		<dc:creator><![CDATA[Yavuz Selim Kart]]></dc:creator>
		<pubDate>Tue, 20 Mar 2018 09:30:04 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Indekslerin Kapladığı Yeri Hesaplamak]]></category>
		<category><![CDATA[SQL Server’da Tablo ve Indekslerin Kapladığı Yeri Hesaplamak]]></category>
		<category><![CDATA[Tablo ve Indekslerin Kapladığı Yeri Hesaplamak]]></category>
		<guid isPermaLink="false">http://sqlserveregitimleri.com/?p=5049</guid>

					<description><![CDATA[Herkese merhaba, Bu yazıda SQL Server’da Tablo ve Index&#8217;lerin kapladığı yeri hesaplamak ile ilgili bilgi vermeye çalışacağım. SQL Server&#8217;da bazı durumlarda Tablo ve Index&#8217;lerin kapladığı...]]></description>
										<content:encoded><![CDATA[<p>Herkese merhaba,</p>
<p>Bu yazıda SQL Server’da Tablo ve Index&#8217;lerin kapladığı yeri hesaplamak ile ilgili bilgi vermeye çalışacağım.</p>
<p>SQL Server&#8217;da bazı durumlarda Tablo ve Index&#8217;lerin kapladığı yeri hesaplamak isteyebilirsiniz.</p>
<p>Aşağıdaki kodu kullanarak siz de bu işlemi rahatlıkla yapabilirsiniz.</p>
<pre class="line-numbers"><code class="language-sql">SELECT
	s.name AS SchemaName
   ,t.name AS TableName
   ,p.rows AS RowCounts
   ,SUM(a.total_pages) * 8 AS TotalSpaceKB
   ,SUM(a.used_pages) * 8 AS UsedSpaceKB
   ,(SUM(a.total_pages) - SUM(a.used_pages)) * 8 AS UnusedSpaceKB
FROM sys.tables t
INNER JOIN sys.schemas s
	ON s.schema_id = t.schema_id
INNER JOIN sys.indexes i
	ON t.object_id = i.object_id
INNER JOIN sys.partitions p
	ON i.object_id = p.object_id
		AND i.index_id = p.index_id
INNER JOIN sys.allocation_units a
	ON p.partition_id = a.container_id
WHERE t.name NOT LIKE 'dt%'    -- filter out system tables for diagramming
AND t.is_ms_shipped = 0
AND i.object_id &gt; 255
GROUP BY t.name
		,s.name
		,p.rows
ORDER BY s.name,
t.name</code></pre>
<p>Yukarıdaki kodu çalıştırınca aşağıdakine benzer bir sonuç göreceksiniz.</p>
<p><img fetchpriority="high" decoding="async" class="alignnone wp-image-15322 size-full" src="https://sqlserveregitimleri.com/wp-content/uploads/2018/03/sql-serverda-tablo-ve-indexlerin-kapladigi-yeri-hesaplamak-1.jpg" alt="SQL Server’da Tablo ve Index'lerin Kapladığı Yeri Hesaplamak" width="700" height="487" srcset="https://sqlserveregitimleri.com/wp-content/uploads/2018/03/sql-serverda-tablo-ve-indexlerin-kapladigi-yeri-hesaplamak-1.jpg 700w, https://sqlserveregitimleri.com/wp-content/uploads/2018/03/sql-serverda-tablo-ve-indexlerin-kapladigi-yeri-hesaplamak-1-315x219.jpg 315w, https://sqlserveregitimleri.com/wp-content/uploads/2018/03/sql-serverda-tablo-ve-indexlerin-kapladigi-yeri-hesaplamak-1-431x300.jpg 431w, https://sqlserveregitimleri.com/wp-content/uploads/2018/03/sql-serverda-tablo-ve-indexlerin-kapladigi-yeri-hesaplamak-1-194x135.jpg 194w" sizes="(max-width: 700px) 100vw, 700px" /></p>
<p>Görüldüğü üzere Tablo ve Index&#8217;lerin kapladığı yeri hesaplamış olduk.</p>
<p>Herkese çalışma hayatında ve yaşamında başarılar kolaylıklar.</p>
<div class='epvc-post-count'><span class='epvc-eye'></span>  <span class="epvc-count"> 391</span><span class='epvc-label'> Kez Okundu</span></div>]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
