Select to view content in your preferred language

ArcGIS10 Query layers vs SDE Spatial view

10845
12
05-24-2011 11:51 PM
NiallCarter
Occasional Contributor
Hi all

Which is quicker, and what are the benefits/pitfalls of using the new Query layers at ArcGIS 10 versus a spatial view created by using the SDETABLE -o Create_view command?

It seems that both are able to display data using SQL from the database (I am using Oracle SDO geom). As far as I can see the difference is that the query layer will execute the SQL statement at every map redraw whilst the SDE spatial view will create a database view and then display off that; surely this will mean that the view will perform quicker?

Thanks,

Niall
12 Replies
DanMcCoy
Frequent Contributor
So, just using the same SQL from the Query Layer to create a DB view, then registering it with the GDB would essentially get you the same thing as using sdetable -o create_view?
0 Kudos
MarcoBoeringa
MVP Alum
So, just using the same SQL from the Query Layer to create a DB view, then registering it with the GDB would essentially get you the same thing as using sdetable -o create_view?


I think I need to correct myself here a bit. This is all a bit to the limit of what I tested, but if I understand the Help right, you can only register tables, not views, with the geodatabase.

This essentially means the spatial view that you create, will remain a stand-alone table / layer, not registered and read-only. So you can't edit it or have it participate in geodatabase behaviour. ArcCatalog and ArcMap are able to make good use of the data though.

As an example, as to what is possible and to what I tested, in the images below you see a database view created that joins an ArcSDE Versioned View with a normal database table based on the fields "name" and "morph_type" that have the same content. You preferably need to include an ObjectID as well in the view definition if already available, otherwise ArcCatalog or ArcMap will prompt you for a unique column (combination).

The SQL statement for this is shown both in SQL Server Management Studio, and in ArcCatalog. In ArcCatalog you see the resultant layer (just one record actually, a multi-part polygon in this test).

The example screenshot here is from ArcGIS 10.2, but Query Layer functionality, and the ability to directly see and use non-geodatabase registered spatial tables in ArcCatalog, was introduced at 10.0.
0 Kudos
JeriLedbetter
Deactivated User
I was under the impression that I could publish a service using a View. I'm getting a high unresolved error, Code 00021, "Feature selections are not supported." This error code supposedly indicates that I have features selected, which I do not. I'm using ArcMap 10.1 Standard and Server Standard. I've created a view using a large geodatabase and a table. I don't want to join and export them, because they are derived from separate sources, and each will be updated individually.

I would appreciate any advice.

- Jeri
0 Kudos