Hi Anthony,
Can you please expand on this?
We can message if you like?
I am trying to publish a view as a map service, but I get the high warning message saying that the view does not have a spatial index.
Any thoughts?
I am on
Microsoft SQL server 2014.120.5579.0
EGDB is 10.4.1
I found these resources, but would like some help:
But there is no information on doing this on Microsoft SQL server.
Listing 2 on this (http://www.esri.com/news/arcuser/1012/files/querylayers.pdf) article says:
create spatial index MyTABLE _ shape on MyTABLE _ tbl (shape)
USING GEOMETRY _ GRID WITH (BOUNDING _ BOX = (Xmin,Ymin,Xmax,Ymax))
Spoke to ESRI support, and, as Brent above said, Spatial Indexes cannot be created on views.
They can only be created on the underlying fc and table that the view references.
Another option may be to add multicolumn attribute indexes on fields from the underlying fc’s and tables that will be queried in the view.
Read
http://desktop.arcgis.com/en/arcmap/10.3/manage-data/tables/creating-attribute-indexes.htm
Andres:
Have you been able to publish your view as a mapservice? If so, have do you plan on using the data (e.g. Do you intend to perform queries on the mapservice and it's associated view? I have been working with a view from Oracle and I am encountering fundamental flaws with how the client is communicating back to the database (where clause and sort by appears to be dropped when the SQL statement is sent to the database.
Here are some threads that touch on these issues and I don't believe they are database specific so it would occur in Oracle, SQL Server, Postgres:
Fundamental flaw when opening attribute tables in ArcGIS Pro?
https://community.esri.com/thread/216276-available-values-for-a-query-layer-subset-selection
I was able to publish the view as a map service.
I created the view using the 'create database view' tool
Then, registered the view with the geodatabase with ArcGIS Pro or ArcMap 10.5
I am using this map service in a agol web map to display the latest inspection record from a table, symbolized from a field.
In other words, the view is used to symbolize desired records.
I will not perform further queries on the view.
The only reason I wanted to create attribute index was so that the view would run faster (because I heard that over time, as data grows, views start lagging in performance draw times).
I will read up on the threads you posted, and let you know if I can think of something else regarding your situation.
When creating a spatial view, ArcGIS will not create a spatial index (or any index) on the view (DBMS' may not support indexes on view at all unless it is a materialized view), the key aspect is to make sure the underlying database tables that are referenced in the view have the appropriate indexes.
Hope this helps,
-Brent
Hi,
I too have seen this issue before long ago. Please post your environment info along with a sdelayer -o describe_long of the feature class and spatial view.
In my situation, i believe my problem was passing the wrong srid to view creation command that prevented the use of the spatial index.
good luck,
Anthony