Section courante

A propos

Section administrative du site

CREATE SPATIAL INDEX

Crée un index spatial
  Microsoft SQL Server

Syntaxe

CREATE SPATIAL INDEX index_name
ON ( spatial_column_name )
{
geometry_tessellation | geography_tessellation
}
[ ON { filegroup_name | "default" } ]
[;]

object ::=
{ database_name.schema_name.table_name | schema_name.table_name | table_name }

geometry_tessellation ::=
{
geometry_automatic_grid_tessellation
| geometry_manual_grid_tessellation
}

geometry_automatic_grid_tessellation ::=
{
[ USING GEOMETRY_AUTO_GRID ]
WITH (
bounding_box
[ [,] tessellation_cells_per_object [ ,...n] ]
[ [,] spatial_index_option [ ,...n] ]
)
}

geometry_manual_grid_tessellation ::=
{
[ USING GEOMETRY_GRID ]
WITH (
bounding_box
[ [,]tessellation_grid [ ,...n] ]
[ [,]tessellation_cells_per_object [ ,...n] ]
[ [,]spatial_index_option [ ,...n] ]
)
}

geography_tessellation ::=
{
geography_automatic_grid_tessellation | geography_manual_grid_tessellation
}

geography_automatic_grid_tessellation ::=
{
[ USING GEOGRAPHY_AUTO_GRID ]
[ WITH (
[ [,] tessellation_cells_per_object [ ,...n] ]
[ [,] spatial_index_option ]
) ]
}

geography_manual_grid_tessellation ::=
{
[ USING GEOGRAPHY_GRID ]
[ WITH (
[ tessellation_grid [ ,...n] ]
[ [,] tessellation_cells_per_object [ ,...n] ]
[ [,] spatial_index_option [ ,...n] ]
) ]
}

bounding_box ::=
{
BOUNDING_BOX = ( {
xmin, ymin, xmax, ymax
| named_bb_coordinate, named_bb_coordinate, named_bb_coordinate, named_bb_coordinate
} )
}

named_bb_coordinate ::= { XMIN = xmin | YMIN = ymin | XMAX = xmax | YMAX=ymax }

tessellation_grid ::=
{
GRIDS = ( { grid_level [ ,...n ] | grid_size, grid_size, grid_size, grid_size }
)
}
tessellation_cells_per_object ::=
{
CELLS_PER_OBJECT = n
}

grid_level ::=
{
LEVEL_1 = grid_size
| LEVEL_2 = grid_size
| LEVEL_3 = grid_size
| LEVEL_4 = grid_size
}

grid_size ::= { LOW | MEDIUM | HIGH }

spatial_index_option ::=
{
PAD_INDEX = { ON | OFF }
| FILLFACTOR = fillfactor
| SORT_IN_TEMPDB = { ON | OFF }
| IGNORE_DUP_KEY = OFF
| STATISTICS_NORECOMPUTE = { ON | OFF }
| DROP_EXISTING = { ON | OFF }
| ONLINE = OFF
| ALLOW_ROW_LOCKS = { ON | OFF }
| ALLOW_PAGE_LOCKS = { ON | OFF }
| MAXDOP = max_degree_of_parallelism
| DATA_COMPRESSION = { NONE | ROW | PAGE }
}

Description

Cette instruction permet de créer un index spatial dans la table et la colonne spécifié dans SQL Server.



Dernière mise à jour : Vendredi, le 19 Juin 2020