Index Class

 

The Index object represents a SQL Server index.

Namespace:   Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)


[PhysicalFacetAttribute]
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)]
public sealed class Index : ScriptNameObjectBase, ISfcSupportsDesignMode, 
	ICreatable, IDroppable, IDropIfExists, IMarkForDrop, IAlterable, 
	IRenamable, IExtendedProperties, IScriptable

NameDescription
System_CAPS_pubmethodIndex()

Initializes a new instance of the Index class.

System_CAPS_pubmethodIndex(SqlSmoObject, String)

Initializes a new instance of the Index class on the specified parent object and with the specified name.

NameDescription
System_CAPS_pubpropertyBoundingBoxXMax

Gets or sets the x-coordinate of the upper right corner of a bounding box.

System_CAPS_pubpropertyBoundingBoxXMin

Gets or sets the x-coordinate of the lower-left corner of a bounding box.

System_CAPS_pubpropertyBoundingBoxYMax

Gets or sets the y-coordinate of upper-right corner of a bounding box.

System_CAPS_pubpropertyBoundingBoxYMin

Gets or sets the y-coordinate of the lower-left corner of a bounding box.

System_CAPS_pubpropertyBucketCount

Gets or sets the value of the bucket count for a hash index.

System_CAPS_pubpropertyCellsPerObject

Gets or sets the maximum number of cells that tessellation can count per object.

System_CAPS_pubpropertyCompactLargeObjects

Gets or sets the Boolean property value that specifies whether to compact the large object (LOB) data in the index.

System_CAPS_pubpropertyCompressAllRowGroups

System_CAPS_pubpropertyDisallowPageLocks

Gets or sets the Boolean property value that specifies whether the index allows page locks.

System_CAPS_pubpropertyDisallowRowLocks

Gets or sets the Boolean property value that specifies whether the index allows row locks.

System_CAPS_pubpropertyEvents

Gets the index events supported by the Index object.

System_CAPS_pubpropertyExecutionManager

(Inherited from SqlSmoObject.)

System_CAPS_pubpropertyExtendedProperties

Gets a collection of ExtendedProperty objects. Each ExtendedProperty object represents an extended property defined on the Index object.

System_CAPS_pubpropertyFileGroup

Gets or sets the filegroup where the index pages are stored.

System_CAPS_pubpropertyFileStreamFileGroup

Gets or Sets the file group name for the index.

System_CAPS_pubpropertyFileStreamPartitionScheme

Gets or Sets the partition scheme name for the index.

System_CAPS_pubpropertyFillFactor

Gets or sets the percentage of an index page to fill when the index is created or re-created.

System_CAPS_pubpropertyFilterDefinition

Gets or sets the String value that contains the definition for the filter.

System_CAPS_pubpropertyHasCompressedPartitions

Gets or sets the Boolean property value that specifies whether the index has compressed partitions.

System_CAPS_pubpropertyHasFilter

Gets the Boolean property value that specifies whether the index has a filter defined for a range of index values.

System_CAPS_pubpropertyID

Gets the index ID value that uniquely identifies the index within the database.

System_CAPS_pubpropertyIgnoreDuplicateKeys

Gets or sets the Boolean property value that specifies whether the index ignores duplicate keys.

System_CAPS_pubpropertyIndexedColumns

Gets a collection of IndexedColumn objects that represent all the columns participating in the index.

System_CAPS_pubpropertyIndexedXmlPathName

Gets or sets the name of the indexed XML path.

System_CAPS_pubpropertyIndexedXmlPathNamespaces

Gets the collection of indexed XML path namespace.

System_CAPS_pubpropertyIndexedXmlPaths

Gets or sets the collection of indexed XML paths.

System_CAPS_pubpropertyIndexKeyType

Gets or sets the index key type.

System_CAPS_pubpropertyIndexType

Gets or sets the type of index.

System_CAPS_pubpropertyIsClustered

Gets or sets the Boolean property value that specifies whether the index is clustered.

System_CAPS_pubpropertyIsDisabled

Gets or sets the Boolean property value that specifies whether the index is disabled.

System_CAPS_pubpropertyIsFileTableDefined

Gets or sets whether the file table is defined.

System_CAPS_pubpropertyIsFullTextKey

Gets the Boolean value that specifies whether the index is enabled for row identification in Microsoft Search.

System_CAPS_pubpropertyIsIndexOnComputed

Gets the Boolean property value that specifies whether the index is based on a computed column.

System_CAPS_pubpropertyIsIndexOnTable

Gets the Boolean property value that specifies whether the index is defined for a table or a view.

System_CAPS_pubpropertyIsMemoryOptimized

Gets or sets the Boolean property value that specifies whether the index is memory optimized.

System_CAPS_pubpropertyIsPartitioned

Gets the Boolean property value that specifies whether the index is stored in a partitioned scheme.

System_CAPS_pubpropertyIsSpatialIndex

Gets a value that indicates whether an index is a spatial index.

System_CAPS_pubpropertyIsSystemNamed

Gets the Boolean property value that specifies whether the index was named automatically by the system.

System_CAPS_pubpropertyIsSystemObject

Gets the Boolean property value that specifies whether the index is a system object.

System_CAPS_pubpropertyIsUnique

Gets or sets the Boolean property value that specifies whether the index is unique or not.

System_CAPS_pubpropertyIsXmlIndex

Gets or sets the Boolean property value that specifies whether the index is an XML index.

System_CAPS_pubpropertyLevel1Grid

Gets or sets the first level of decomposition for a geometry data type.

System_CAPS_pubpropertyLevel2Grid

Gets or sets the second level of decomposition for a geometry data type.

System_CAPS_pubpropertyLevel3Grid

Gets or sets the third level of decomposition for a geometry data type.

System_CAPS_pubpropertyLevel4Grid

Gets or sets the fourth level of decomposition for a geometry data type.

System_CAPS_pubpropertyLowPriorityAbortAfterWait

Gets or sets the action that will be taken after the Low Priority expires during an online index build operation on this index.

System_CAPS_pubpropertyLowPriorityMaxDuration

Gets or sets the amount of time (in minutes) to wait with Low Priority for acquiring the locks required for the online index build operations on this Index.

System_CAPS_pubpropertyMaximumDegreeOfParallelism

Gets or sets the maximum number of processors that can be used when running a query that uses the index.

System_CAPS_pubpropertyName

Gets or sets the name of the index.(Overrides NamedSmoObject.Name.)

System_CAPS_pubpropertyNoAutomaticRecomputation

Gets or sets the Boolean property value that specifies whether statistics are regenerated when an index is created.

System_CAPS_pubpropertyOnlineIndexOperation

Gets or sets the Boolean property value that specifies whether the index will be kept online during index operations thus allowing access to the data.

System_CAPS_pubpropertyPadIndex

Gets or sets the Boolean property value that specifies whether space is left open on each page of the intermediate levels of the index.

System_CAPS_pubpropertyParent

Gets or sets the SqlSmoObject object that is the parent of the Index object.

System_CAPS_pubpropertyParentXmlIndex

Gets or sets the parent of an XML index.

System_CAPS_pubpropertyPartitionScheme

Gets or sets the partition scheme associated with the index.

System_CAPS_pubpropertyPartitionSchemeParameters

Represents a collection of PartitionSchemeParameter objects. Each PartitionSchemeParameter object represents a parameter in the partition scheme associated with the index.

System_CAPS_pubpropertyPhysicalPartitions

Gets a collection of PhysicalPartition objects that represent all the physical partitions on which the index is stored.

System_CAPS_pubpropertyProperties

Gets a collection of Property objects that represent the object properties.(Inherited from SqlSmoObject.)

System_CAPS_pubpropertySecondaryXmlIndexType

Gets or sets the secondary XML index type.

System_CAPS_pubpropertySortInTempdb

Gets or sets the Boolean property value that specifies whether the index is sorted using the tempdb database for intermediate storage of data.

System_CAPS_pubpropertySpaceUsed

Gets or sets the disk space used to store the index data in kilobytes.

System_CAPS_pubpropertySpatialIndexType

Gets or sets the Spatial Index Type for a column.

System_CAPS_pubpropertyState

Gets the state of the referenced object.(Inherited from SmoObjectBase.)

System_CAPS_pubpropertyUrn

Gets the Uniform Resource Name (URN) address value that uniquely identifies the object.(Inherited from SqlSmoObject.)

System_CAPS_pubpropertyUserData

Gets or sets user-defined data associated with the referenced object.(Inherited from SmoObjectBase.)

NameDescription
System_CAPS_pubmethodAlter()

Updates any Index object property changes on the instance of SQL Server.

System_CAPS_pubmethodAlter(IndexOperation)

Updates any Index object property changes on the instance of SQL Server for a specified index operation.

System_CAPS_pubmethodAlterAllIndexes()

Updates any Index object property changes for all indexes on the instance of SQL Server for a specified index operation.

System_CAPS_pubmethodCheckIndex()

Tests the integrity of database pages that store the index.

System_CAPS_pubmethodCheckIndexWithResult()

Tests the integrity of database pages that store the index.

System_CAPS_pubmethodCreate()

Creates an index on the instance of SQL Server as defined by the Index object.

System_CAPS_pubmethodDisable()

Disables the index.

System_CAPS_pubmethodDiscover()

Discovers a list of type Object.(Inherited from SqlSmoObject.)

System_CAPS_pubmethodDrop()

Drops the index.

System_CAPS_pubmethodDropAndMove(String)

Drops a clustered index and moves the underlying table data to the specified filegroup.

System_CAPS_pubmethodDropAndMove(String, StringCollection)

Drops a clustered index and moves the underlying table data to the partition scheme with the specified partition scheme parameters.

System_CAPS_pubmethodDropIfExists()

System_CAPS_pubmethodEnable(IndexEnableAction)

Enables the index.

System_CAPS_pubmethodEnumFragmentation()

Enumerates a list of fragmentation information for the index using the default fast fragmentation option.

System_CAPS_pubmethodEnumFragmentation(FragmentationOption)

Enumerates a list of fragmentation information for the index with the specified fragmentation option.

System_CAPS_pubmethodEnumFragmentation(FragmentationOption, Int32)

Enumerates a list of fragmentation information for the index with the specified fragmentation option and partition number.

System_CAPS_pubmethodEnumStatistics()

Enumerates a list of statistical information for the index.

System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_protmethodFormatSqlVariant(Object)

Formats an object as T: Microsoft.Data.Schema.Sql.DataGenerator.SqlVariant type.(Inherited from SqlSmoObject.)

System_CAPS_protmethodGetContextDB()

Gets the context database that is associated with this object.(Inherited from SqlSmoObject.)

System_CAPS_protmethodGetDBName()

Gets the database name that is associated with the object.(Inherited from SqlSmoObject.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_protmethodGetPropValue(String)

Gets a property value of the SqlSmoObject object.(Inherited from SqlSmoObject.)

System_CAPS_protmethodGetPropValueOptional(String)

Gets a property value of the SqlSmoObject object.(Inherited from SqlSmoObject.)

System_CAPS_protmethodGetPropValueOptionalAllowNull(String)

Gets a property value of the SqlSmoObject object.(Inherited from SqlSmoObject.)

System_CAPS_protmethodGetServerObject()

Gets the server of the SqlSmoObject object.(Inherited from SqlSmoObject.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodInitialize()

Initializes the object and forces the properties be loaded.(Inherited from SqlSmoObject.)

System_CAPS_pubmethodInitialize(Boolean)

Initializes the object and forces the properties be loaded.(Inherited from SqlSmoObject.)

System_CAPS_protmethodIsObjectInitialized()

Verifies whether the object has been initialized.(Inherited from SqlSmoObject.)

System_CAPS_protmethodIsObjectInSpace()

Verifies whether the object is isolated or connected to the instance of SQL Server.(Inherited from SqlSmoObject.)

System_CAPS_pubmethodIsSupportedProperty(String)

(Inherited from SqlSmoObject.)

System_CAPS_pubmethodMarkForDrop(Boolean)

Marks the index to be dropped the next time that the Alter method is run on the Index object's parent object.

System_CAPS_pubmethodRebuild()

Rebuilds the index.

System_CAPS_pubmethodRebuild(Int32)

Rebuilds the index on the partition with the specified partition number.

System_CAPS_pubmethodRebuildAllIndexes()

Rebuilds all the indexes.

System_CAPS_pubmethodRecalculateSpaceUsage()

Updates the disk resource usage of the index.

System_CAPS_pubmethodRecreate()

Re-creates the index.

System_CAPS_pubmethodRefresh()

Refreshes the Index object and its properties.(Overrides ScriptNameObjectBase.Refresh().)

System_CAPS_pubmethodRename(String)

Renames the index.

System_CAPS_pubmethodReorganize(Int32)

System_CAPS_pubmethodReorganizeAllIndexes()

Reorganizes all the indexes based on current property settings.

System_CAPS_pubmethodScript()

Generates a Transact-SQL script that can be used to re-create the index.

System_CAPS_pubmethodScript(ScriptingOptions)

Generates a Transact-SQL script that can be used to re-create the index as specified by the script options.

System_CAPS_protmethodSetParentImpl(SqlSmoObject)

Sets the parent of the SqlSmoObject to the newParent parameter.(Inherited from SqlSmoObject.)

System_CAPS_pubmethodToString()

Returns a String that represents the referenced object.(Inherited from SqlSmoObject.)

System_CAPS_pubmethodUpdateStatistics()

Updates statistics for the referenced index.

System_CAPS_pubmethodUpdateStatistics(StatisticsScanType)

Updates statistics for the referenced index with the specified statistics scan type.

System_CAPS_pubmethodUpdateStatistics(StatisticsScanType, Int32)

Updates statistics for the referenced index with the specified statistics scan type and specified sample size.

System_CAPS_pubmethodUpdateStatistics(StatisticsScanType, Int32, Boolean)

Updates statistics for the referenced index with the specified statistics scan type and specified sample size and with the option to recompute the statistics.

System_CAPS_pubmethodUpgradeToClusteredColumnStoreIndex()

Upgrades the index to either clustered index or column store index.

System_CAPS_pubmethodValidate(String, Object[])

Validates the state of an object.(Inherited from SmoObjectBase.)

NameDescription
System_CAPS_pubeventPropertyChanged

Represents the event that occurs when a property is changed.(Inherited from SqlSmoObject.)

System_CAPS_pubeventPropertyMetadataChanged

Represents the event that occurs when property metadata changes.(Inherited from SqlSmoObject.)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodIAlienObject.Discover()

Discovers any dependencies.

Do not reference this member directly in your code. It supports the SQL Server infrastructure.(Inherited from SqlSmoObject.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIAlienObject.GetDomainRoot()

Returns the root of the domain.(Inherited from SqlSmoObject.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIAlienObject.GetParent()

Gets the parent of this object. Do not reference this member directly in your code. It supports the SQL Server infrastructure.(Inherited from SqlSmoObject.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIAlienObject.GetPropertyType(String)

Gets the type of the specified property.(Inherited from SqlSmoObject.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIAlienObject.GetPropertyValue(String, Type)

Gets the value of the specified property.(Inherited from SqlSmoObject.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIAlienObject.GetUrn()

Gets the Unified Resource Name (URN) of the object.

Do not reference this member directly in your code. It supports the SQL Server infrastructure.(Inherited from SqlSmoObject.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIAlienObject.Resolve(String)

Gets the instance that contains the information about the object from the Unified Resource Name (URN) of the object.(Inherited from SqlSmoObject.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIAlienObject.SetObjectState(SfcObjectState)

Sets the object state to the specified SfcObjectState value.(Inherited from SqlSmoObject.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIAlienObject.SetPropertyValue(String, Type, Object)

Sets the property value.(Inherited from SqlSmoObject.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodISfcPropertyProvider.GetPropertySet()

Gets the interface reference to the set of properties of this object.

Do not reference this member directly in your code. It supports the SQL Server infrastructure.(Inherited from SqlSmoObject.)

System_CAPS_pubinterfaceSystem_CAPS_privpropertyISfcSupportsDesignMode.IsDesignMode

To get Index object properties, users can be a member of the public fixed server role.

To set Index object properties, create or drop an index, update statistics on an index, or rebuild, reorganize, or re-create an index, users must have one of the following:

  • ALTER permission on the parent table or view

  • Membership of the db_owner or the db_ddladmin fixed database roles

  • Membership of the sysadmin fixed server role

Any public static (Shared in Microsoft Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: