I've come to be pretty dependent on both Geometry and Geography storage types, given that I can do significantly more automated data management and processing with them both. Knowing that I'm taking a performance hit by using them, there are a lot of tuning options available, which I've managed to get Geography performing as well, if not faster in some cases, than binary. The biggest gain comes from tweaking the spatial index, but there are other gains from adding other non-clustered indexes and or statistics based on specific use.
As for view performance, one can force indexes on a view at creation with schemabinding:
CREATE VIEW [dbo].[ELKOFFTAKE_VIEW_LOCATIONS] WITH SCHEMABINDING AS SELECT OBJECTID, VERROR, MAPSOURCE, SOURCEDATE, EDITDATE, MAPMETHOD, QUADNAME, UNITNAME, HERROR, COUNTY, STATE, X_COORD, Y_COORD, LAT, LON, WATERSHED, STREAMNAME, ELEVATION, YR, NOTES, COORD_UNITS, COORD_SYSTEM, DATUM, UTM_ZONE, MANAGEMENTZONE, PARKDISTRICT, EDITBY, CREATEBY, CREATEDATE, UNITCODE, RESTRICTION, VEG_CLASS, LANDFORM, GlobalID AS 'LOC_ID', LOC_NAME, TRAIL, ROAD, VALID_RESULT FROM [dbo].[WILD_ELK_OFFTAKE_LOC_PT] GO
Then
CREATE UNIQUE CLUSTERED INDEX IDX_WILD_ELK_OFFTAKE_LOC_PT ON ELKOFFTAKE_VIEW_LOCATIONS (LOC_ID);
The 'sdelayer -o register' command is used to register tables or views in native storage(or ST_GEOMETRY, where available) with ArcSDE
But why has ESRI made Geometry the default storage format at ArcSDE 10.1
What could Esri possibly do about this issue? Stage a coup? -V
I've noticed the horrible response for Geometry verses SDEBinary. Has ESRI said how long SDEBinary will continue to be a storage option?
There is a known bug NIM089293 from a year ago dealing with the draw time for the GEOMETRY spatial type verses the draw time for SDEBINARY. Unfortunately, it's severity is "low." In my experience that usually means it's not going to be fixed.
It's not just spatial views, it's all tables which involve GEOMETRY/GEOGRAPHY objects, but these are an aspect of Microsoft's database implementation (and the difficulty of tuning it), not anything Esri has control over.- V
Marco, I would not classify a Query Layer as a "view" at all. It is QUERY. A query is an expression which retrieves data from tables. A view is a database object that stores an SQL query in such a way to reduce theoverhead of parsing the query.The Query Layer stores the query and rendering rules against either atable or a view, and reapplies that query each time it needs to
(note that views cannot be registered withthe geodatabase, just with ArcSDE, which is what that message means).
C:\>sdelayer -o register Error: Table name and spatial column must be specified. Error: Entity Type Mask must be specified. Error: A geometry storage type must be specified (-t). Valid types are ST_GEOMETRY, SDO_GEOMETRY. ArcSDE 10.2 Layer Administration Utility ----------------------------------------------------- sdelayer -o register -l <table,column> -e <entity_mask> -t <storage_type> [Spatial_Index] [{-R <SRID> | [Spatial_Ref_Opts]}] [-C <row_id_column>[,{SDE|USER}[,<min_ID>]]] [-E {empty | xmin,ymin,xmax,ymax}][-P {BASIC | HIGH}] [-S <layer_description_str>] [-q] [-k <config_keyword>] [-i <service>] [-s <server_name] [-u <DB_User_name>] [-p <DB_User_password>] [-D <database>] Where [Spatial_Ref_Opts] := [-x <xoffset,yoffset,xyscale[,xyClusterTol]>] [-z <zoffset,zscale[,zClusterTol]>] [-m <moffset,mscale[,mClusterTol]>] [-G {<projection_ID> | file=<proj_file_name>}] [Spatial_Index] := [-g {<Grid_Options> | GRID,<Grid_Options> | AUTOMATIC | NONE | RTREE}] [Grid_Options] := [<grid_sz0>[,<grid_sz1>[,<grid_sz2>]] [,{FULL | SPARSE}]] sdelayer -h sdelayer -?
I would say the next focus should be on registering views, not creating them.
Wait right there -- This is the key misunderstanding. Query Layers are a way of accessing spatial databases without ArcSDE. There is no correlation between views andQuery Layers, other than that they need to be spatial to be rendered.
They certainly can be registered with an enterprise geodatabase, if you a) have an enterprise geodatabase, and b) choose to do so.
Query Layers are a way of accessing spatial databases without ArcSDE..
It's not just spatial views, it's all tables which involve GEOMETRY/GEOGRAPHY objects, but these are an aspect of Microsoft's database implementation (and the difficulty of tuning it), not anything Esri has control over.
When you use SSMS to make a "view that includes a spatial column", why would it not be interpreted as a "spatial view" (confusion in terms)?
When the CreateDatabaseView_management tool was introduced, why would an end user not think "I can use this tool to make a spatial view", when it actually gets interpreted in ArcGIS as a query layer?
Why can views created using SSMS or CreateDatabaseView_management not be registered with the GDB (and hence store feature type, extents, description/metadata, etc.)?
ArcGIS 10.1+ has seen much of the command line tools become GP/GUI tasks, but creating actual spatial views is one are where ESRI needs to focus.
Since there is indeed a speed difference between spatial views and query layers,
but views are much easier to manage using SSMS, our approach has been to make a "dummy" spatial view using command line, then modify the view definition in SSMS.
We've also seen a speed difference between spatial views built on feature classes stored in the default Geometry spatial type (slower) versus SDEBINARY (faster).
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.