Table.IndexSpaceUsed 속성

Gets the space used by the index, in KB.

네임스페이스:  Microsoft.SqlServer.Management.Smo
어셈블리:  Microsoft.SqlServer.Smo(Microsoft.SqlServer.Smo.dll)

구문

‘선언
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.Expensive Or SfcPropertyFlags.Standalone)> _
Public ReadOnly Property IndexSpaceUsed As Double 
    Get
‘사용 방법
Dim instance As Table 
Dim value As Double 

value = instance.IndexSpaceUsed
[SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Expensive|SfcPropertyFlags.Standalone)]
public double IndexSpaceUsed { get; }
[SfcPropertyAttribute(SfcPropertyFlags::None|SfcPropertyFlags::Expensive|SfcPropertyFlags::Standalone)]
public:
property double IndexSpaceUsed {
    double get ();
}
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Expensive|SfcPropertyFlags.Standalone)>]
member IndexSpaceUsed : float
function get IndexSpaceUsed () : double

속성 값

유형: System.Double
A Float64 value that specifies space used by the index, in KB.

The following code example shows how to list the amount of index space used by each table in the AdventureWorks2012 database.

C#

Server srv = new Server("(local)");
Database db = srv.Databases["AdventureWorks2012"];

foreach (Table tb in db.Tables) 
{
   Console.WriteLine("The " + tb.Name + " table has uses " + tb.IndexSpaceUsed.ToString() + " KB of index space.");
}

Powershell

$srv = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")
$db = New-Object Microsoft.SqlServer.Management.Smo.Database
$db = $srv.Databases.Item("AdventureWorks2012")

Foreach ($tb in $db.Tables) 
{
   Write-Host "The" $tb.Name "table uses " $tb.IndexSpaceUsed " KB of index space."
}

참고 항목

참조

Table 클래스

Microsoft.SqlServer.Management.Smo 네임스페이스

관련 자료

테이블

CREATE TABLE(Transact-SQL)