Problem: Shapefile size increases after running a Join operation
The size of a shapefile increases significantly after joining a table to the shapefile and exporting the joined shapefile and table to a new shapefile to make the join permanent. The size increment takes place in the .dbf file extension of the shapefile, which stores the attribute information of features in the shapefile.
The length of the fields in the table joined to the shapefile are set to a very high value. When exporting the shapefile containing fields with high-length values into a new shapefile, the exported shapefile maintains the length of fields of the joined table. This results in a significant increase of the exported shapefile size, specifically in the .dbf file extension of the shapefile.
Solution or Workaround
To reduce the size of the .dbf file extension of the shapefile, use one of the following three workarounds:Option 1: Export the joined shapefile as a geodatabase feature class
Export as a feature class instead of a shapefile. Feature classes compress unused space and results in a smaller output file.
Follow the steps below to export the joined shapefile to a feature class after joining the table to the shapefile.
- Right-click the joined shapefile in the Table Of Contents, and click Data > Export Data.
- Click the Export arrow, and select All features, Selected features, or All features In View Extent.
- Click Browse, and set a name for the output feature class.
- Select File and Personal Geodatabase feature classes as the file type.
- Navigate to a geodatabase for the output location, and click Save.
- Click OK. The shapefile is exported as a geodatabase feature class.
Option 2: Use the Merge tool to set the field's length in the exported shapefile to a smaller value
Keep the exported data in shapefile form instead of a feature class, but reduce the length of fields in the shapefile by using the Merge tool. The Merge tool provides the ability to control the fields in the output dataset and the contents of the fields using the Field Map control, which allows the length value of the fields to be set to a lower value and reduces the size of the output shapefile.
Follow the steps below after joining the table to the shapefile and exporting the shapefile to a new shapefile, to edit the fields length in the exported shapefile:
- Open Data Management Tools, and navigate to General > Merge.
- Select the exported shapefile containing the attributes from the joined table as the Input Datasets.
- Set a name and location for the Output Dataset.
- Under the Field Map section, right-click the field to edit the field length property, and click Properties....
- In the Output Field Properties dialog box, edit the Length parameter in the Properties section to a lower value.
- Click OK to save the edits.
- Repeat steps 4 and 5 for all fields to edit the length property of the field to a lower value.
- Click OK to run the merge operation.
Option 3: Modify the table's source before joining in ArcMap
Edit the source of the table to reduce the size before joining it to a shapefile. For example, set the length value of the fields from the table source (e.g., Microsoft Excel or Access) to a lower value. This workaround ensures the size of the table is at its minimum size before joining the table to a shapefile in ArcMap.
- How To: Export a layer from ArcMap to a geodatabase feature class
- ArcGIS Desktop Help: Merge
- ArcGIS Desktop Help: Shapefile file extensions