<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Compact_management in Python makes the geodatabase larger in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/compact-management-in-python-makes-the-geodatabase/m-p/167956#M12978</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not the exact script from the Help, but a similar one:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import arcpy&lt;/P&gt;&lt;P&gt;from arcpy import env&lt;/P&gt;&lt;P&gt;env.workspace = {full path to the database}&lt;/P&gt;&lt;P&gt;arcpy.Compact_management(env.workspace)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried setting a variable equal to the workspace and then running the Compact on the variable rather than directly on the env.workspace with the same results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I initially ran the above script on the database after adding some non-spatial tables to it and noticed the size increase. I then compacted the database using ArcCatalog, right-click, Administration&amp;gt;Compact database and found that it dropped the size by 1/3. I then reran the same script on the same database and it inflated the size. Compacting through ArcCatalog dropped it back down.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it helps, I'm running Windows 7 and ArcGIS 10.2.2.3552.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Feb 2016 20:14:06 GMT</pubDate>
    <dc:creator>MarkMiller4</dc:creator>
    <dc:date>2016-02-04T20:14:06Z</dc:date>
    <item>
      <title>Compact_management in Python makes the geodatabase larger</title>
      <link>https://community.esri.com/t5/python-questions/compact-management-in-python-makes-the-geodatabase/m-p/167954#M12976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When using Compact_management in Python it actually makes the geodatabase larger. Has anyone else noticed this, or any ideas as to why this might be happening?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using it on a file geodatabase. When I right-click on it in ArcCatalog and use the Administration&amp;gt;Compact Database command it compacts down to about 6.6 MB. When I run the Python script it inflates it to about 9 MB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas or suggestions would be greatly appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Feb 2016 18:52:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/compact-management-in-python-makes-the-geodatabase/m-p/167954#M12976</guid>
      <dc:creator>MarkMiller4</dc:creator>
      <dc:date>2016-02-04T18:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: Compact_management in Python makes the geodatabase larger</title>
      <link>https://community.esri.com/t5/python-questions/compact-management-in-python-makes-the-geodatabase/m-p/167955#M12977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Which python script? the one at the end of the help topic? Did you run it twice...once through catalog then again via script?&amp;nbsp; Some detail is missing in your described steps &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/compact.htm" title="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/compact.htm"&gt;Compact—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Feb 2016 19:55:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/compact-management-in-python-makes-the-geodatabase/m-p/167955#M12977</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-02-04T19:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: Compact_management in Python makes the geodatabase larger</title>
      <link>https://community.esri.com/t5/python-questions/compact-management-in-python-makes-the-geodatabase/m-p/167956#M12978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not the exact script from the Help, but a similar one:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import arcpy&lt;/P&gt;&lt;P&gt;from arcpy import env&lt;/P&gt;&lt;P&gt;env.workspace = {full path to the database}&lt;/P&gt;&lt;P&gt;arcpy.Compact_management(env.workspace)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried setting a variable equal to the workspace and then running the Compact on the variable rather than directly on the env.workspace with the same results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I initially ran the above script on the database after adding some non-spatial tables to it and noticed the size increase. I then compacted the database using ArcCatalog, right-click, Administration&amp;gt;Compact database and found that it dropped the size by 1/3. I then reran the same script on the same database and it inflated the size. Compacting through ArcCatalog dropped it back down.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it helps, I'm running Windows 7 and ArcGIS 10.2.2.3552.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Feb 2016 20:14:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/compact-management-in-python-makes-the-geodatabase/m-p/167956#M12978</guid>
      <dc:creator>MarkMiller4</dc:creator>
      <dc:date>2016-02-04T20:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: Compact_management in Python makes the geodatabase larger</title>
      <link>https://community.esri.com/t5/python-questions/compact-management-in-python-makes-the-geodatabase/m-p/167957#M12979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;and it was obviously not open all the time...?&amp;nbsp; There is nothing in the help topic that would suggest why if anything, would cause this.&amp;nbsp; Oddly, I the only thing I could suggest is to reboot completely between attempts and try reversing the order of you compaction attempts to see if the inflation/deflation process is due to the order of the use of catalog/script ... or just the order of doing it...itself.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Feb 2016 20:38:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/compact-management-in-python-makes-the-geodatabase/m-p/167957#M12979</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-02-04T20:38:16Z</dc:date>
    </item>
  </channel>
</rss>

