Hello all,
I was hoping to open a discussion on SDE Spatial Views versus a SDE layer in a mxd with an applied definition query. I've searched around but haven't found any good information on best practices with spatial views and when might be appropriate and when might not be appropriate to use them.
Here is my scenario. I work for a county and we recently acquired an impervious surface layer that was derived by a consultant from LiDAR and photo analysis. The data is classified as either Building, Road or other. The data team requested that the data be loaded into the SDE database and be provided as two separate layers; impervious layer and building footprints. Additionally, manual edits will need to take place on the building footprints to make them more useable to the end users (i.e. splitting condos and row homes). Because of that I wanted to make sure that there was one layer that was being edited to maintain topological correctness.
Upon hearing the request my initial thought was to load the entire impervious surface as a feature class and then create a spatial view of the impervious surface using the where clause of type = Building. As we worked through some of our testing, what was found was that a Spatial View is actually slower to perform than the impervious layer added to ArcMap with a definition query applied to it. I ran traces from the DB side and found the same thing, it is more expensive to run the Spatial View than allowing ArcMap to use a definition query.
I had been under the assumption that using a literal from an application would be less efficient than compiling that into a db object. If anyone can weigh in on this that has a bit more experience I would really appreciate it.
Thanks,
Adam Z