Partager via


Spatial Indexes Dialog Box

You use the Spatial Indexes dialog box to create indexes for columns of the geometry or geography data type (spatial columns), which you cannot index by using the Index/Keys dialog box. You can add more than one spatial index to each spatial column, but you must create them one at a time. For more information, see Spatial Indexing Overview and Restrictions on Spatial Indexes on the Microsoft Web site.

In the Spatial Indexes dialog box, the Selected Spatial Index list displays any spatial indexes that have been defined for the table. You can add or delete spatial indexes by clicking the command buttons that appear under the list. You modify a spatial index by clicking it in the list and changing one or more of its properties.

Properties

  • Cells Per Object
    Indicates how many tessellation cells you can use for each spatial object in the index. You can set this property to any integer between 1 and 8192, inclusive. By default, this property is set to 16.

    At the top level, if an object covers more cells than specified by n, the indexing uses as many cells as necessary to provide a complete top-level tessellation. In such cases, an object might receive more than the number of cells that you specified. In this case, the top-level grid generates the maximum number of cells, and that number depends on the Level 1 density.

  • Columns
    Indicates the column name and sort order. (This property is read-only.)

  • IsSpatialIndex
    Indicates that a spatial index is selected. (This property is read-only.)

  • Level 1
    Indicates the density of the first-level (top) grid.

  • Level 2
    Indicates the density of the second-level grid.

  • Level 3
    Indicates the density of the third-level grid.

  • Level 4
    Indicates the density of the fourth-level grid.

  • Tessellation Scheme
    Indicates the tessellation scheme, either a geometry grid for a geometry column or a geography grid for a geography column.

  • Type
    Indicates that a spatial index is selected.

  • X Max
    Indicates the x-coordinate of the upper-right corner of the bounding box. This property is unavailable if the tessellation scheme is a geography grid.

  • X Min
    Indicates the x-coordinate of the lower-left corner of the bounding box. This property is unavailable if the tessellation scheme is a geography grid.

  • Y Max
    Indicates the y-coordinate of upper-right corner of the bounding box. This property is unavailable if the tessellation scheme is a geography grid.

  • Y Min
    Indicates the y-coordinate of the lower-left corner of the bounding box. This property is unavailable if the tessellation scheme is a geography grid.

  • (Name)
    Indicates the name of the spatial index. When an index is created, its default name is based on the active table in Table Designer. You can rename the index at any time.

  • Description
    Indicates characteristics of the index. You can provide a more detailed description if you click Description, and then click the ellipsis button () that appears next to the property field. You can write a longer description in the field that appears.

  • Fill Factor
    Indicates what percentage of the index page the system can fill. When a page is full, the system must split the page if data is added, which reduces performance.

    • If the value is set to 100, the pages will be full. This value requires the least amount of storage space but is the least efficient. You should use this value only if the data will not change (for example, on a read-only table).

    • A lower value leaves more space on the data pages, which reduces the need to split data pages as indexes grow. However, you need more storage space. Lower values are more appropriate if the data in the table will change.

  • Pad Index
    Indicates that pages in this index have the same percentage of space (padding) that is specified in the Fill Factor property.

  • Is Disabled
    Indicates whether this index is disabled. Disabled indexes do not support searches and are not updated when items are added to the table. You can improve performance for bulk inserts and updates if you disable an index.

  • Page Locks Allowed
    Indicates whether page-level locking is allowed on this index. If queries that use the index will not run concurrently, you might increase performance by allowing page locks. However, you should not allow page locks if such queries will run concurrently because deadlocks are more likely to occur.

  • Re-compute Statistics
    Indicates whether to compute statistics when the index is created. If you re-compute statistics, indexes take more time to build, but queries usually run faster.

  • Row Locks Allowed
    Indicates whether row-level locking is allowed on this index. If queries that use this index might run concurrently, you might increase performance by using row locks. Performance might improve because rows locks can better avoid deadlocks with collocated rows in the spatial index.

See Also

Tasks

How to: Create Spatial Indexes

How to: Delete Spatial Indexes

Other Resources

Working with Indexes