Compress (Data Management)


Compresses an enterprise geodatabase by removing states not referenced by a version and redundant rows.


  • To improve geodatabase performance, compress the geodatabase periodically. A compressed geodatabase is more efficient.

  • Once a geodatabase is compressed, deleted records cannot be recovered.

  • Compressing a geodatabase not only reduces space requirements but can also reduce overall retrieval times.

  • While the Compress tool is running, you can still view data in the geodatabase.

  • Only the geodatabase administrator can perform compress.

  • This tool is not applicable to enterprise geodatabases that do not use versioning.

  • This tool is not applicable to branch versioning.

ParameterExplanationData Type

The database connection file that connects to the enterprise geodatabase to be compressed. Connect as the geodatabase administrator.


Derived Output

NameExplanationData Type

The compressed input geodatabase.


Code sample

Compress example (Python window)

This stand-alone Python script uses the Compress tool to compress the geodatabase.

import arcpy
arcpy.Compress_management("c:/Connection to brockville.sde")


Licensing information

  • Basic: No
  • Standard: Yes
  • Advanced: Yes

Related topics