Compress (Data Management)
Summary
Compresses an enterprise geodatabase by removing states not referenced by a version and redundant rows.
Usage
- 
To improve geodatabase performance, the geodatabase should be compressed periodically. 
- 
A compressed geodatabase is more efficient. A geodatabase that is never compressed is more likely to develop errors. 
- 
Once a geodatabase is compressed, deleted records cannot be recovered. 
- 
Compression of geodatabases not only reduces space requirements but can also reduce overall retrieval times. 
- 
When the Compress tool is executed, the geodatabase is unavailable until compression is completed. 
- 
Only the geodatabase administrator can perform compression. 
Syntax
| Parameter | Explanation | Data Type | 
| in_workspace | The enterprise geodatabase to be compressed. | Workspace | 
Code Sample
This stand-alone Python script uses the Compress tool to compress the geodatabase.
import arcpy
 
arcpy.Compress_management("Database Connections\Connection to brockville.sde")