Compact (Data Management) |
|
Release 9.3
Last modified March 8, 2012 |
![]() ![]() ![]() Print all topics in : "Tools" |
Compacts a personal geodatabase or file geodatabase. Compacting rearranges how the geodatabase is stored on disk, often reducing its size and improving performance.
Usage tips
You should compact your databases on a regular basis if you do a lot of data entry and deletion.
Personal and file geodatabases are stored in binary files on your disk drive. As you add/remove/edit data in these files, they will become fragmented, resulting in a decrease in performance.
It is recommended that you compact your personal geodatabase when its size increases to more than 250 MB.
If a database is opened in ArcMap for editing, it cannot be compacted. To compact the database, remove it from ArcMap.
The following environment settings affect this tool: workspace, scratch workspace, and Configuration keyword.
Command line syntax
An overview of the Command Line window
Compact_management <in_workspace>
Parameter | Explanation | Data Type |
<in_workspace> |
The file or personal geodatabase to be compacted |
Workspace |
compact_management d:\landuse.mdb
Scripting syntax
About getting started with writing geoprocessing scripts
Compact_management (in_workspace)
Parameter | Explanation | Data Type |
in_workspace (Required) |
The file or personal geodatabase to be compacted |
Workspace |
import arcgisscripting gp = arcgisscripting.create() gp.workspace = "h:/workspace" gp.toolbox = "management" gp.compact("d:\landuse.mdb")