Statistics in SQL Server databases
Enterprise geodatabases stored in SQL Server databases can be set to update statistics automatically. To do this, leave the database parameters AUTO_CREATE_STATISTICS and AUTO_UPDATE_STATISTICS enabled. Disable autoshrink.
If you do not do this, you need to update statistics with a full scan on all tables involved in your system, including the sde_state_lineages and sde_states tables. To update statistics with a full scan, use one of the following:
- To update statistics for a particular table, you can use the Analyze command or Analyze Datasets tool in ArcGIS for Desktop. See Updating statistics on a dataset using the Analyze Datasets tool and Using the Analyze Datasets tool to update statistics on geodatabase system tables for instructions.
Note:The Analyze command and geoprocessing tool do not perform a full scan when updating statistics.
- Transact SQL (T-SQL)This updates statistics on one table at a time. For updates to all tables in the database, use the sp_updatestats command.
UPDATE STATISTICS <table name> WITH FULLSCAN - ArcSDE sdetable administration command
sdetable –o update_dbms_stats –t <table_name> –m "with fullscan" –i <instance> –D <db> - SqlMaintConsult the SQL Server Books Online for more information regarding SqlMaint. The command can be launched from a command window in the SQL Server installation\mssql\bin directory.
sqlmaint –S <server> –U <user> –P <pass> –D <db> –UpdOptiStats 100
Related Topics
8/21/2013