<?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: arcpy.Append_management creates spatial index in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-append-management-creates-spatial-index/m-p/425520#M33424</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ausome post Neil's,&lt;/P&gt;&lt;P&gt;Been struggling to find a solution to this, especially when the feature class turns to million rows, the append goes on for ever on postgre DB.&lt;/P&gt;&lt;P&gt;But, after this environment setting, it just takes minutes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, i have a question to you.&lt;/P&gt;&lt;P&gt;Do i need to rebuild the spatial index regularly or will the postgre DB take care of this?&lt;/P&gt;&lt;P&gt;I know that, i am asking a postgre DB related question, but this might be applicable for others as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sandeep&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Sep 2015 09:36:45 GMT</pubDate>
    <dc:creator>SandeepKuniel</dc:creator>
    <dc:date>2015-09-04T09:36:45Z</dc:date>
    <item>
      <title>arcpy.Append_management creates spatial index</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-append-management-creates-spatial-index/m-p/425516#M33420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are using arcpy.Append_management to import shape files into existing tables in an Oracle database. For some reason Append_management automatically creates a spatial index after the append. We don't want this behaviour. How can we disable the automagical creation of a spatial index?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Feb 2015 09:02:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-append-management-creates-spatial-index/m-p/425516#M33420</guid>
      <dc:creator>Rvan_Rijen</dc:creator>
      <dc:date>2015-02-12T09:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.Append_management creates spatial index</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-append-management-creates-spatial-index/m-p/425517#M33421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well the creation of the spatial index is a feature of the geodb.&lt;/P&gt;&lt;P&gt;You can create a very long list of inputs and have them all appended together, that way the spatial index is calculated only once at the end.&lt;/P&gt;&lt;P&gt;If you append them invidually, each time append runs the spatial index will be recalculated, which does increase processing time.&lt;/P&gt;&lt;P&gt;Perhaps you can mess with the spatialGrid1, 2, 3 in the arcpy.env settings. Set them all to 0 and see what happens.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Feb 2015 09:25:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-append-management-creates-spatial-index/m-p/425517#M33421</guid>
      <dc:creator>NeilAyres</dc:creator>
      <dc:date>2015-02-12T09:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.Append_management creates spatial index</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-append-management-creates-spatial-index/m-p/425518#M33422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Neil!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For me as an Oracle developer, the automatic creation of the spatial index is not a feature but a bug &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;Your reply has triggered me to look at the arcpy.env settings and initial test show that maintainSpatialIndex does the trick&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14237349824418743" jivemacro_uid="_14237349824418743" modifiedtitle="true"&gt;&lt;P&gt;arcpy.env.maintainSpatialIndex = True&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;It's a bit counter-intuitive, but it looks like arcpy.env.maintainSpatialIndex = True actually means: leave the spatial index status unchanged and if none exists, don't create one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Feb 2015 10:00:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-append-management-creates-spatial-index/m-p/425518#M33422</guid>
      <dc:creator>Rvan_Rijen</dc:creator>
      <dc:date>2015-02-12T10:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.Append_management creates spatial index</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-append-management-creates-spatial-index/m-p/425519#M33423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good to here that you have found the workaround&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Feb 2015 10:32:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-append-management-creates-spatial-index/m-p/425519#M33423</guid>
      <dc:creator>NeilAyres</dc:creator>
      <dc:date>2015-02-12T10:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.Append_management creates spatial index</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-append-management-creates-spatial-index/m-p/425520#M33424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ausome post Neil's,&lt;/P&gt;&lt;P&gt;Been struggling to find a solution to this, especially when the feature class turns to million rows, the append goes on for ever on postgre DB.&lt;/P&gt;&lt;P&gt;But, after this environment setting, it just takes minutes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, i have a question to you.&lt;/P&gt;&lt;P&gt;Do i need to rebuild the spatial index regularly or will the postgre DB take care of this?&lt;/P&gt;&lt;P&gt;I know that, i am asking a postgre DB related question, but this might be applicable for others as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sandeep&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Sep 2015 09:36:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-append-management-creates-spatial-index/m-p/425520#M33424</guid>
      <dc:creator>SandeepKuniel</dc:creator>
      <dc:date>2015-09-04T09:36:45Z</dc:date>
    </item>
  </channel>
</rss>

