Exercise 10: Compress a geodatabase and rebuild indexes and statistics

This topic applies to ArcGIS for Desktop Standard and ArcGIS for Desktop Advanced only.

Complexity: Beginner Data Requirement: ArcGIS Tutorial Data for Desktop Goal: Log in as a geodatabase administrator, compress a geodatabase, and rebuild indexes and statistics on the tables in the geodatabase.

Compressing the geodatabase removes the states that are no longer referenced by a version and moves rows in the delta tables to the business table. Moving the edits from the delta to the business table means queries on the dataset will take less time because the query has to look at only one table instead of querying three tables. The more records there are in the delta tables, the more important it becomes to move the records from the delta tables to the business table.

Both editing and compressing the geodatabase can fragment indexes and cause database statistics to become stale, so you should rebuild indexes and update statistics after a large amount of editing is done and after you compress the geodatabase.

In this exercise, you will log in as the Osokopf geodatabase administrator, manager1; delete the unneeded version; compress the geodatabase; and rebuild its indexes and statistics.

Connecting as a geodatabase administrator

Log into the computer using the manager1 login.

As mentioned previously in this tutorial, how you do this depends on your operating system. On most Windows operating systems, you can switch users. On Windows XP, log off then log in again as manager1.

Deleting the railroadv1 version

Since all edits were reconciled and posted back to the DEFAULT version, the railroadv1 version is no longer needed. Therefore, you can delete it, allowing the geodatabase to fully compress.

Steps:
  1. Start ArcMap, open the Catalog window, then expand the Database Servers folder in the Catalog tree.
  2. Double-click the database server to connect to it and double-click the Osokopf geodatabase to connect to the geodatabase.
  3. Right-click the Osokopf geodatabase, point to Administration, then click Administer Geodatabase.

    The Geodatabase Administration dialog box opens.

  4. On the Versions tab, right-click the railroadv1 version and click Delete Version.
  5. When prompted to confirm that you want to delete the railroadv1 version, click OK.
  6. Close the Geodatabase Administration dialog box.

Compressing the geodatabase

Compress the Osokopf geodatabase to move the edits made to the railroads feature class from the delta tables to the business table and remove unnecessary states from the lineage.

Steps:
  1. Right-click the Osokopf geodatabase, point to Administration, then click Compress Database.
  2. When prompted to confirm the compress operation, click Yes.

Making sure the compress operation was successful

You can find out whether the compress operation was successful and see the last time a compress operation was performed on a geodatabase by checking the geodatabase properties.

Steps:
  1. Right-click the Osokopf geodatabase and click Properties.
  2. Click the Administration tab.
  3. Review the last compress date/time and status in the Compress section. Be sure the date and time correspond to when you performed the compress and that the status is SUCCESS.
  4. Click OK.

Rebuilding indexes and updating database statistics

Editing the data and compressing the geodatabase can cause indexes to be fragmented and database statistics to be out-of-date. The owners of the datasets could rebuild indexes and update database statistics for each individual dataset using the Rebuild Indexes and Analyze Datasets geoprocessing tools, respectively. When using geodatabases on database servers, though, you can also rebuild all indexes and update database statistics in the geodatabase using the Rebuild all indexes option on the Geodatabase Maintenance dialog box. (This option also updates database statistics.)

After edits are performed and the geodatabase is compressed, you should rebuild indexes and update database statistics. The following steps do this for the Osokopf geodatabase:

Steps:
  1. Right-click the Osokopf geodatabase, point to Administration, then click Geodatabase Maintenance.
  2. Choose Rebuild all indexes.
  3. Click OK.

You logged in as a geodatabase administrator, deleted the railroadv1 version, compressed the Osokopf geodatabase, and rebuilt indexes and statistics in the geodatabase.

Related Topics

4/22/2015