In the meantime, I'm working on a python script to read the SDE.LAYER table, feed the appropriate fields into the sdelayer -o si_stats command, and strip the output to usable info and pluck that in a database.
sdelayer -o si_stats is indispensible for maintaining some feature classes, and no equivalent is available in desktop at the current version. The GDBT spatial index examination tool at 10.0 sort of works, but command line works better and faster.
Today I had to use sdelayer -o si_stats to examine and redesign the spatial indexes for statewide parcels. Before change, took four minutes to draw at a reasonably large scale. After change, 6 seconds or less. The before-change spatial index was the one "estimated" automatically by ArcGIS desktop when the data were loaded. Take away this command line tool and our ability to provide well-performing data will be crippled.
We require an alternative to load_only_io mode if Esri is going this route of abandoning SDE command line and offering geoprocessing alternatives. Fortunately SDE command line is still installed from SDE 10 on our server and it still works with our newly upgraded 10.2 geodatabases.
I have a weekly update script that loads 2.3 million parcels from a spatial view to a stand-alone repository feature class.
When performing a simple truncate (TruncateTable) and load (Append), without setting the parcel feature class in load_only_io mode first - load time is over 7 hours! Indexes rebuilt by RebuildIndexes then AnalyzeDatasets as recommended.
As we've traditionally done, by using SDE command line in python script subprocess, setting the feature class into load_only_io mode first, then back into normal_io mode - load time is less than an hour. This works great and rebuilds indexes at the same time. We've had no problems with this process for years and are worried that progressive upgrades are actually moving somethings backwards without appropriate consideration of customers requirements and established processes.
Please provide either a separate "bulk-load" tool that efficiently loads data into SDE at the same rate or provide a geoprocessing tool that does the same SDE command line for load_only_io and normal_io so these can be accessed through arcpy.
Tom Weisenberger
Los Angeles County - Enterprise GIS
Tom - Give the 'Remove Spatial Index' tool a try - this should replace the commandline version of the sdelayer -o load_only / normal_io mode.
Within the current commandline administrators guide there is a statement about this tool with a globe indicating there is a recommended workflow within the user interface to try -
eg: load_only_io
Sets the input/output (I/O) mode of the layer to load-only, dropping the spatial index, and allowing only store and replace I/O operations <esri globe> You can use the Remove Spatial Index geoprocessing tool or a Python script to drop the spatial index, placing the layer or feature class in load only I/O mode instead of this operation. |
Melissa, thanks for your response.
I will investigate if this alternative will work for us. This is the main parcel feature class used by several map services and by users throughout the enterprise - so lots of connections to it. My main concern using this method is schema locks. Even though the parcel load script runs at night I would need to add code to remove all connections/locks first in order to run Remove Spatial Index. I'm concerned about failures if any locks remain. The command line would do it all regardless of any locks. (or does it remove connections/locks itself?)
Tom Weisenberger
Los Angeles County - Enterprise GIS
Sorry for my delay in response. I agree that the remove spatial index tool does appear to need an exclusive lock from my testing. I do not know if the commandline tool removes existing connections - maybe did not check for shared locks against the datasets before dropping the spatial index previously. Please try the schemalockingenabled parameter within your map service to see if this alleviates the issues you are experiencing when trying to update the spatial index, etc.