Compress (Data Management) |
|
Release 9.2
Last modified November 29, 2010 |
![]() ![]() ![]() Print all topics in : "Tools" |
Compresses an ArcSDE geodatabase by removing states not referenced by a version and redundant rows.
Usage tips
When you delete a record from a database, it is only marked as deleted; it is not actually removed from the associated table. Therefore, the table will remain the same size after you delete records. To actually remove deleted records from the database, you must compress the database.
To improve database performance, the database should be compressed periodically.
A compressed database is more efficient. A database that is never compressed is more likely to develop errors.
Once a database is compressed, deleted records cannot be recovered.
Compression of databases not only reduces space requirements but can also reduce overall retrieval times.
When the Compress tool is executed, the database is unavailable until compression is completed.
Only the SDE administrator can perform compression.
After compressing the database or editing the data, the Analyze command should be executed to update the database statistics for each dataset or feature class. This will improve display and query performance.
The following environment settings affect this tool: workspace, scratch workspace, and Configuration keyword.
Command line syntax
An overview of the Command Line window
Compress_management <in_workspace>
Parameter | Explanation | Data Type |
<in_workspace> |
The ArcSDE database to be compressed. |
Workspace |
compress_management 'Database Connections\Connection to deerfoot.sde'
Scripting syntax
About getting started with writing geoprocessing scripts
Compress_management (in_workspace)
Parameter | Explanation | Data Type |
in_workspace (Required) |
The ArcSDE database to be compressed. |
Workspace |
import arcgisscripting gp = arcgisscripting.create() gp.toolbox = "management" gp.compress("Database Connections\Connection to deerfoot.sde")