× Heads up!

Aqua Data Studio / nhilam

Follow
IDE for Relational Databases
×
ivangron reported Feb 25, 2010  · tomconrad last modified Mar 8, 2018

sql server -- indexes -- extracting and scripting ddl -- currently not handling spatial indexes and xml indexes


PM
Priority Low
Complexity Unknown
Component DB - MS SQL Server
Version Future

 

CREATE SPATIAL INDEX index_name 
  ON <object> ( spatial_column_name )
    {
       [ USING <geometry_grid_tessellation> ]
          WITH ( <bounding_box> 
                [ [,] <tesselation_parameters> [ ,...n ] ] 
                [ [,] <spatial_index_option> [ ,...n ] ] ) 
     | [ USING <geography_grid_tessellation> ] 
          [ WITH ( [ <tesselation_parameters> [ ,...n ] ]
                   [ [,] <spatial_index_option> [ ,...n ] ] ) ]
    } 
  [ ON { filegroup_name | "default" } ]

 

 

CREATE [ PRIMARY ] XML INDEX index_name 
    ON <object> ( xml_column_name )
    [ USING XML INDEX xml_index_name 
        [ FOR { VALUE | PATH | PROPERTY } ] ]
    [ WITH ( <xml_index_option> [ ,...n ] ) ]

spatial example:
CREATE TABLE SpatialTable (id int primary key, geometry_col geometry)
GO
CREATE SPATIAL INDEX spatialindex
   ON SpatialTable(geometry_col)
   WITH ( BOUNDING_BOX = ( 0, 0, 500, 200 ) )

xml example:
CREATE TABLE dbo.testtableindexxml  ( id int NOT NULL, name varchar(25) NULL, colxml xml NULL,
    CONSTRAINT pkind PRIMARY KEY(id))
    ON [PRIMARY]
GO
CREATE PRIMARY XML INDEX textxmlindex ON dbo.testtableindexxml (colxml)
GO

these indexes will not show up under there tables, but will show up under all index folder, and if scripted will be all wrong...

 

NielsGron   May 14, 2010
Field Old Value New Value
Version 09.0 10.0
NielsGron   Jan 30, 2011
Field Old Value New Value
Version 10.0 12.0
NielsGron   May 18, 2012
Field Old Value New Value
Description

CREATE SPATIAL INDEX index_name 
  ON <object> ( spatial_column_name )
    {
       [ USING <geometry_grid_tessellation> ]
          WITH ( <bounding_box> 
                [ [,] <tesselation_parameters> [ ,...n ] ] 
                [ [,] <spatial_index_option> [ ,...n ] ] ) 
     | [ USING <geography_grid_tessellation> ] 
          [ WITH ( [ <tesselation_parameters> [ ,...n ] ]
                   [ [,] <spatial_index_option> [ ,...n ] ] ) ]
    }
  [ ON { filegroup_name | "default" } ]

CREATE [ PRIMARY ] XML INDEX index_name 
    ON <object> ( xml_column_name )
    [ USING XML INDEX xml_index_name
        [ FOR { VALUE | PATH | PROPERTY } ] ]
    [ WITH ( <xml_index_option> [ ,...n ] ) ]

spatial example:
CREATE TABLE SpatialTable (id int primary key, geometry_col geometry)
GO
CREATE SPATIAL INDEX spatialindex
   ON SpatialTable(geometry_col)
   WITH ( BOUNDING_BOX = ( 0, 0, 500, 200 ) )

xml example:
CREATE TABLE dbo.testtableindexxml  ( id int NOT NULL, name varchar(25) NULL, colxml xml NULL,
    CONSTRAINT pkind PRIMARY KEY(id))
  ON [PRIMARY]
GO
CREATE PRIMARY XML INDEX textxmlindex ON dbo.testtableindexxml (colxml)
GO

these indexes will not show up under there tables, but will show up under all index folder, and if scripted will be all wrong...

 

CREATE SPATIAL INDEX index_name 
  ON <object> ( spatial_column_name )
    {
       [ USING <geometry_grid_tessellation> ]
          WITH ( <bounding_box> 
                [ [,] <tesselation_parameters> [ ,...n ] ] 
                [ [,] <spatial_index_option> [ ,...n ] ] ) 
     | [ USING <geography_grid_tessellation> ] 
          [ WITH ( [ <tesselation_parameters> [ ,...n ] ]
                   [ [,] <spatial_index_option> [ ,...n ] ] ) ]
    } 
  [ ON { filegroup_name | "default" } ]

 

 

CREATE [ PRIMARY ] XML INDEX index_name 
    ON <object> ( xml_column_name )
    [ USING XML INDEX xml_index_name 
        [ FOR { VALUE | PATH | PROPERTY } ] ]
    [ WITH ( <xml_index_option> [ ,...n ] ) ]

spatial example:
CREATE TABLE SpatialTable (id int primary key, geometry_col geometry)
GO
CREATE SPATIAL INDEX spatialindex
   ON SpatialTable(geometry_col)
   WITH ( BOUNDING_BOX = ( 0, 0, 500, 200 ) )

xml example:
CREATE TABLE dbo.testtableindexxml  ( id int NOT NULL, name varchar(25) NULL, colxml xml NULL,
    CONSTRAINT pkind PRIMARY KEY(id))
    ON [PRIMARY]
GO
CREATE PRIMARY XML INDEX textxmlindex ON dbo.testtableindexxml (colxml)
GO

these indexes will not show up under there tables, but will show up under all index folder, and if scripted will be all wrong...

 

Version 12.0 Future - .2
SachinPrakash   Nov 29, 2016
Field Old Value New Value
Dev Assignee NielsGron (Niels Gron) SachinPrakash (Sachin Prakash)
Version Future - .2 19.0
SachinPrakash   Nov 29, 2016
Field Old Value New Value
Component App - General DB - MS SQL Server
SachinPrakash   Jul 24, 2017
Field Old Value New Value
Status Unconfirmed New
Version 19.0 20.0
tomconrad   Mar 8, 2018
Field Old Value New Value
Version 20.0 Future

Issue #3646

New
 
 
Completion
No due date
No fixed build
No time estimate

About AquaClusters Privacy Policy Support Version - 19.0.2-4 AquaFold, Inc Copyright © 2007-2017