Database management systems determine the most efficient way to execute the queries sent to them based on database statistics. Therefore, for optimal performance of datasets created within ArcSDE geodatabases, you need to keep the database statistics current by frequently updating them.
When a feature class is registered as versioned, adds and deletes tables are created to hold the records that are added to and deleted from a business table. When a version is registered, the process automatically updates the statistics for all the required tables. After that, as changes are made to the feature class, the distribution of information in the tables and indexes changes, causing the database statistics to become outdated.
Database statistics should be updated in the following instances:
- After you perform major operations, such as creating new datasets, adding or removing topology rules, or loading large amounts of new data into existing objects.
- On a regular basis to maintain statistics made stale by edits to existing data; for actively edited geodatabases, updating statistics once a week should maintain acceptable performance.
You can update the statistics of feature classes from within ArcGIS Desktop, no matter what supported database you use to store your data. This is the preferred method for updating statistics on individual datasets. For instructions on updating database statistics in ArcGIS Desktop, see Updating statistics on a geodatabase using Analyze or Analyze.
You can also use the update_dbms_stats operation of the sdetable command to update statistics for specific tables and indexes or all indexes. See the ArcSDE Administration Command Reference provided with ArcGIS Server at the Enterprise level for more information on the sdetable command.
Updating database statistics is an input/output (I/O)-intensive operation. You should plan to update statistics when database traffic is at its lightest.