<?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: CopyFeatures_management function working very slow in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/copyfeatures-management-function-working-very-slow/m-p/123078#M9569</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you intent is to have a new copy of the original FC, with the fields of the other two tables added, maybe try copying the FC first, then using&amp;nbsp; the JoinField command&amp;nbsp; &lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001700000065000000" title="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001700000065000000" rel="nofollow noopener noreferrer" target="_blank"&gt;ArcGIS Desktop&lt;/A&gt;&lt;/P&gt;&lt;H2 id="toc-hId-1617888639"&gt;Summary&lt;/H2&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN class="glossary"&gt;Joins&lt;/SPAN&gt; the contents of a table to another table based on a common attribute field. The input table is updated to contain the fields from the join table. You can select which fields from the join table will be added to the input table.&lt;/P&gt;&lt;P&gt;The records in the &lt;SPAN class="uicontrol"&gt;Input Table&lt;/SPAN&gt; are matched to the records in the &lt;SPAN class="uicontrol"&gt;Join Table&lt;/SPAN&gt; based on the values of&lt;SPAN class="uicontrol"&gt; Input Join Field&lt;/SPAN&gt; and the &lt;SPAN class="uicontrol"&gt;Output Join Field&lt;/SPAN&gt;. Optionally, only desired fields can be selected from the &lt;SPAN class="uicontrol"&gt;Join Table&lt;/SPAN&gt; and appended to the &lt;SPAN class="uicontrol"&gt;Input Table&lt;/SPAN&gt; during the join.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The reason I say make a copy first...and work with the copy...is this is a permanent join, vs the add join being temporary.&amp;nbsp; From the sample is 10.0 help..&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# PermanentJoin.py
# Purpose: Join two fields from a table to a feature class 
# Author: ESRI

# Import system modules
import arcpy
from arcpy import env

# Set the current workspace 
env.workspace = "c:/data/data.gdb"

# Set the local parameters
inFeatures = "zion_park"
joinField = "zonecode"
joinTable = "zion_zoning"
fieldList = ["land_use", "land_cover"]

# Join two feature classes by the zonecode field and only carry 
# over the land use and land cover fields
arcpy.JoinField_management (inFeatures, joinField, joinTable, joinField, fieldList)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 07:05:03 GMT</pubDate>
    <dc:creator>RebeccaStrauch__GISP</dc:creator>
    <dc:date>2021-12-11T07:05:03Z</dc:date>
    <item>
      <title>CopyFeatures_management function working very slow</title>
      <link>https://community.esri.com/t5/python-questions/copyfeatures-management-function-working-very-slow/m-p/123074#M9565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi , I am trying to use CopyFeatures_management function in ArcGIS 10 using python script and its working too slow. My dataset which it is copying is around 1 GB in size. It is taking 2 days to copy features to finish. Everything works fine like merging , joining ..but the problem is with CopyFeatures_management function.&amp;nbsp; Here's my sample code for the join process.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;def processJoin(lyr):
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Join logistics tables to network fc
&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.AddMessage("Joining lrs table...")
&amp;nbsp;&amp;nbsp;&amp;nbsp; logFile.write("Joining lrs table...\n")
&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.AddJoin_management(lyr, JOIN_FLD, lrs, JOIN_FLD)
&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.AddMessage("Joining ltr table...")
&amp;nbsp;&amp;nbsp;&amp;nbsp; logFile.write("Joining ltr table...\n")
&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.AddJoin_management(lyr, tempFC + "." + JOIN_FLD, ltr, JOIN_FLD)

&amp;nbsp;&amp;nbsp;&amp;nbsp; # Copy layer to fc
&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.AddMessage("Copying features to feature class...")
&amp;nbsp;&amp;nbsp;&amp;nbsp; logFile.write("Copying features to feature class...\n")
&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.CopyFeatures_management(lyr, ExportRoadnetwork)
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As you can see from the code, we are just calling CopyFeatures_management to make a copy of the newly joined feature class. But its taking 2 days to finish. Size of the joined dataset is around 1 GB for state data of DC,VA,PA,DE,MD and NJ. We are only using *.*nw data with lrs and ltr for restrictions. Although merge is just taking 20-25 minutes , copying the features is itself taking too long to complete. Can anybody please provide some suggestions where I am doing wrong or how can I improve performance in the script.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2012 08:38:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copyfeatures-management-function-working-very-slow/m-p/123074#M9565</guid>
      <dc:creator>MuraliChoudari</dc:creator>
      <dc:date>2012-04-19T08:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: CopyFeatures_management function working very slow</title>
      <link>https://community.esri.com/t5/python-questions/copyfeatures-management-function-working-very-slow/m-p/123075#M9566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Murali,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you tried using the &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001700000065000000"&gt;Join Field&lt;/A&gt;&lt;SPAN&gt; tool?&amp;nbsp; This will join the table directly to the other table without the need of copying the feature class to maintain the join.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2012 10:22:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copyfeatures-management-function-working-very-slow/m-p/123075#M9566</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2012-04-19T10:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: CopyFeatures_management function working very slow</title>
      <link>https://community.esri.com/t5/python-questions/copyfeatures-management-function-working-very-slow/m-p/123076#M9567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My experience is that CopyFeatures_management is fairly broken if you use it to overwrite an existing feature class. It takes 10-100 times longer than when there is no existing file at the destination.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2016 12:33:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copyfeatures-management-function-working-very-slow/m-p/123076#M9567</guid>
      <dc:creator>AlexMackie</dc:creator>
      <dc:date>2016-04-29T12:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: CopyFeatures_management function working very slow</title>
      <link>https://community.esri.com/t5/python-questions/copyfeatures-management-function-working-very-slow/m-p/123077#M9568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are there attribute indices on the two fields in the tables that you are joining?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2016 11:39:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copyfeatures-management-function-working-very-slow/m-p/123077#M9568</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2016-05-26T11:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: CopyFeatures_management function working very slow</title>
      <link>https://community.esri.com/t5/python-questions/copyfeatures-management-function-working-very-slow/m-p/123078#M9569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you intent is to have a new copy of the original FC, with the fields of the other two tables added, maybe try copying the FC first, then using&amp;nbsp; the JoinField command&amp;nbsp; &lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001700000065000000" title="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001700000065000000" rel="nofollow noopener noreferrer" target="_blank"&gt;ArcGIS Desktop&lt;/A&gt;&lt;/P&gt;&lt;H2 id="toc-hId-1617888639"&gt;Summary&lt;/H2&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN class="glossary"&gt;Joins&lt;/SPAN&gt; the contents of a table to another table based on a common attribute field. The input table is updated to contain the fields from the join table. You can select which fields from the join table will be added to the input table.&lt;/P&gt;&lt;P&gt;The records in the &lt;SPAN class="uicontrol"&gt;Input Table&lt;/SPAN&gt; are matched to the records in the &lt;SPAN class="uicontrol"&gt;Join Table&lt;/SPAN&gt; based on the values of&lt;SPAN class="uicontrol"&gt; Input Join Field&lt;/SPAN&gt; and the &lt;SPAN class="uicontrol"&gt;Output Join Field&lt;/SPAN&gt;. Optionally, only desired fields can be selected from the &lt;SPAN class="uicontrol"&gt;Join Table&lt;/SPAN&gt; and appended to the &lt;SPAN class="uicontrol"&gt;Input Table&lt;/SPAN&gt; during the join.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The reason I say make a copy first...and work with the copy...is this is a permanent join, vs the add join being temporary.&amp;nbsp; From the sample is 10.0 help..&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# PermanentJoin.py
# Purpose: Join two fields from a table to a feature class 
# Author: ESRI

# Import system modules
import arcpy
from arcpy import env

# Set the current workspace 
env.workspace = "c:/data/data.gdb"

# Set the local parameters
inFeatures = "zion_park"
joinField = "zonecode"
joinTable = "zion_zoning"
fieldList = ["land_use", "land_cover"]

# Join two feature classes by the zonecode field and only carry 
# over the land use and land cover fields
arcpy.JoinField_management (inFeatures, joinField, joinTable, joinField, fieldList)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:05:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copyfeatures-management-function-working-very-slow/m-p/123078#M9569</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2021-12-11T07:05:03Z</dc:date>
    </item>
  </channel>
</rss>

