﻿<?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>SQL Server&#8217;da Kullanılmayan Indexleri Bulmak &#8211; SQL Server Eğitimleri</title>
	<atom:link href="https://sqlserveregitimleri.com/etiket/sql-serverda-kullanilmayan-indexleri-bulmak/feed" rel="self" type="application/rss+xml" />
	<link>https://sqlserveregitimleri.com</link>
	<description>SQL Server ile ilgili her şey</description>
	<lastBuildDate>Sun, 25 Dec 2022 15:25:44 +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&#8217;da Kullanılmayan Indexleri Bulmak</title>
		<link>https://sqlserveregitimleri.com/sql-serverda-kullanilmayan-indexleri-bulmak</link>
		
		<dc:creator><![CDATA[Yavuz Selim Kart]]></dc:creator>
		<pubDate>Sun, 25 Dec 2022 15:25:44 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server kullanılmayan Index]]></category>
		<category><![CDATA[SQL Server'da Kullanılmayan Indexleri Bulmak]]></category>
		<guid isPermaLink="false">https://sqlserveregitimleri.com/?p=15027</guid>

					<description><![CDATA[Herkese merhaba, Bu yazıda SQL Server’da kullanılmayan Index&#8217;leri bulmak ile ilgili bilgi vermeye çalışacağım. SQL Server’da bazı durumlarda kullanılmayan Index&#8217;leri bulmak isteyebilirsiniz. Aşağıdaki kodu kullanarak...]]></description>
										<content:encoded><![CDATA[<p>Herkese merhaba,</p>
<p>Bu yazıda SQL Server’da kullanılmayan Index&#8217;leri bulmak ile ilgili bilgi vermeye çalışacağım.</p>
<p>SQL Server’da bazı durumlarda kullanılmayan Index&#8217;leri bulmak 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 o.name AS ObjectName,
       i.name AS IndexName,
       i.index_id AS IndexID,
       dm_ius.user_seeks AS UserSeek,
       dm_ius.user_scans AS UserScans,
       dm_ius.user_lookups AS UserLookups,
       dm_ius.user_updates AS UserUpdates,
       p.TableRows,
       'DROP INDEX ' + QUOTENAME(i.name) + ' ON ' + QUOTENAME(s.name) + '.' + QUOTENAME(OBJECT_NAME(dm_ius.object_id)) AS 'drop statement'
FROM sys.dm_db_index_usage_stats dm_ius
    INNER JOIN sys.indexes i
        ON i.index_id = dm_ius.index_id
           AND dm_ius.object_id = i.object_id
    INNER JOIN sys.objects o
        ON dm_ius.object_id = o.object_id
    INNER JOIN sys.schemas s
        ON o.schema_id = s.schema_id
    INNER JOIN
    (
        SELECT SUM(p.rows) TableRows,
               p.index_id,
               p.object_id
        FROM sys.partitions p
        GROUP BY p.index_id,
                 p.object_id
    ) p
        ON p.index_id = dm_ius.index_id
           AND dm_ius.object_id = p.object_id
WHERE OBJECTPROPERTY(dm_ius.object_id, 'IsUserTable') = 1
      AND dm_ius.database_id = DB_ID()
      AND i.type_desc = 'nonclustered'
      AND i.is_primary_key = 0
      AND i.is_unique_constraint = 0
ORDER BY (dm_ius.user_seeks + dm_ius.user_scans + dm_ius.user_lookups) ASC;
GO</code></pre>
<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"> 197</span><span class='epvc-label'> Kez Okundu</span></div>]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
