<?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: Performance for Append vs Insert Cursor in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223537#M7691</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm a bit confused if this topic is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A. Attempting to join &lt;/SPAN&gt;&lt;SPAN style="text-decoration:underline;"&gt;fields&lt;/SPAN&gt;&lt;SPAN&gt; to a main table from a look up table(s).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;B. Attempting to append &lt;/SPAN&gt;&lt;SPAN style="text-decoration:underline;"&gt;records&lt;/SPAN&gt;&lt;SPAN&gt; to a main table from some other table(s).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think it's A, but if it is B, I will add this: &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/66434-A-better-way-to-run-large-Append-Merge-jobs"&gt;http://forums.arcgis.com/threads/66434-A-better-way-to-run-large-Append-Merge-jobs&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Aug 2013 16:34:43 GMT</pubDate>
    <dc:creator>ChrisSnyder</dc:creator>
    <dc:date>2013-08-12T16:34:43Z</dc:date>
    <item>
      <title>Performance for Append vs Insert Cursor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223531#M7685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok I have a feature class (260k records) and 3 tables.&amp;nbsp; I need to get specific information (about 20 fields) from each into a new feature class.&amp;nbsp; I have several different ways to do this and I???m curious if anyone has done any performance testing and&amp;nbsp; knows which of my options would be ???best???.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Option 1&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I could create several joins and append the data into the new feature class, with some additional field calculations for cleanup.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Option 2&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Create a python script that would loop through each record, search cursor the other tables for data, then insert cursor into the new feature class.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Alan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Aug 2013 18:09:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223531#M7685</guid>
      <dc:creator>AlanToms</dc:creator>
      <dc:date>2013-08-09T18:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: Performance for Append vs Insert Cursor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223532#M7686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Ok I have a feature class (260k records) and 3 tables.&amp;nbsp; I need to get specific information (about 20 fields) from each into a new feature class.&amp;nbsp; I have several different ways to do this and I�??m curious if anyone has done any performance testing and&amp;nbsp; knows which of my options would be �??best�?�.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Option 1&lt;/STRONG&gt;&lt;BR /&gt;I could create several joins and append the data into the new feature class, with some additional field calculations for cleanup.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Option 2&lt;/STRONG&gt;&lt;BR /&gt;Create a python script that would loop through each record, search cursor the other tables for data, then insert cursor into the new feature class.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you&lt;BR /&gt;Alan&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Assuming the join fields are indexed on all of the tables, option 1 blew away cursors under the pre-da version cursors.&amp;nbsp; Have not tested the da version cursors.&amp;nbsp; However, even ArcObjects cursors perform slower than joins, so I doubt Option 2 would work faster even with a da cursor.&amp;nbsp; Hitting tables with repeated queries is much slower than a join, which does just one correlation of the tables, because each new query has to reset the table read, as far as I know.&amp;nbsp; Main reason to not use joins would be if there was a 1:M or M:M relationship to traverse.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Aug 2013 18:41:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223532#M7686</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2013-08-09T18:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: Performance for Append vs Insert Cursor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223533#M7687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Assuming the join fields are indexed on all of the tables, option 1 blew away cursors under the pre-da version cursors.&amp;nbsp; Have not tested the da version cursors.&amp;nbsp; However, even ArcObjects cursors perform slower than joins, so I doubt Option 2 would work faster even with a da cursor.&amp;nbsp; Hitting tables with repeated queries is much slower than a join, which does just one correlation of the tables, because each new query has to reset the table read, as far as I know.&amp;nbsp; Main reason to not use joins would be if there was a 1:M or M:M relationship to traverse.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;That's kind of what I figured; just needed some one else to back me up. &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&amp;nbsp; I'll go with the append.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Alan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Aug 2013 19:08:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223533#M7687</guid>
      <dc:creator>AlanToms</dc:creator>
      <dc:date>2013-08-09T19:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: Performance for Append vs Insert Cursor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223534#M7688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you were to try the Python route at some point, most posts in the Python forum read the related table and place its data in a dictionary to do the match up between tables.&amp;nbsp; THe in memory dictionary will perform much better than repeated queries with a cursor.&amp;nbsp; I suspect the Join must use some process through memory as well, since in a field calculation it initially hesitates, but then blasts through many join calculations, especially when the records to transfer can easily be read into memory.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Aug 2013 20:59:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223534#M7688</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2013-08-09T20:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: Performance for Append vs Insert Cursor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223535#M7689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="plain" name="code"&gt;I'll go with the append.&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Don't!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Going the Python route (reading the join tables(s) into a dictionary using a search cursor and then updating the main table via an update cursor is by far the fastest method. This is true in v10.0 and below, but is especially true in v10.1+ using ethe data access cursors. In addition to faster processing, this method is far more flexible in that allows for all sorts of error handeling and whatnot through conditional expressions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example, say you want to get the fields "ADDRESS" and "CITY" into the main table (key field being "NAME"):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;#UNTESTED! lutTbl = r"C:\temp\test.gdb\lookuptable" mainTbl = "r"C:\temp\test.gdb\maintable" lutDict= dict([(r[0], (r[1], r[2])) for r in arcpy.da.SearchCursor(lutTbl, ["NAME","ADDRESS","CITY")]) arcpy.AddField_managment(mainTbl, "ADDRESS", "TEXT", "", "", "75") arcpy.AddField_managment(mainTbl, "CITY", "TEXT", "", "", "30") updateRows = arcpy.da.UpdateCursor(mainTbl, ["NAME","ADDRESS","CITY"]) for updateRow in updateRows: &amp;nbsp;&amp;nbsp;&amp;nbsp; nameValue = updateRow[0]&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if nameValue in lutDict: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; updateRow[1] = lutDict[nameValue][0]&amp;nbsp; #Address &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; updateRow[2] = lutDict[nameValue][1]&amp;nbsp; #City &amp;nbsp;&amp;nbsp;&amp;nbsp; else: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Could not locate address/city info for " + str(nameValue)&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; updateRows.updateRow(updateRow) del updateRow, updateRows&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2013 15:38:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223535#M7689</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2013-08-12T15:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: Performance for Append vs Insert Cursor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223536#M7690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't use python if there is a geoprocessing way of doing things.&amp;nbsp; Debug time is too much with Python for me.&amp;nbsp; Keeps my life simpler and I would bet Append is faster.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2013 15:57:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223536#M7690</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2013-08-12T15:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Performance for Append vs Insert Cursor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223537#M7691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm a bit confused if this topic is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A. Attempting to join &lt;/SPAN&gt;&lt;SPAN style="text-decoration:underline;"&gt;fields&lt;/SPAN&gt;&lt;SPAN&gt; to a main table from a look up table(s).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;B. Attempting to append &lt;/SPAN&gt;&lt;SPAN style="text-decoration:underline;"&gt;records&lt;/SPAN&gt;&lt;SPAN&gt; to a main table from some other table(s).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think it's A, but if it is B, I will add this: &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/66434-A-better-way-to-run-large-Append-Merge-jobs"&gt;http://forums.arcgis.com/threads/66434-A-better-way-to-run-large-Append-Merge-jobs&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2013 16:34:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223537#M7691</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2013-08-12T16:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: Performance for Append vs Insert Cursor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223538#M7692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;I'll go with the append.&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;Don't!&lt;BR /&gt;&lt;BR /&gt;Going the Python route (reading the join tables(s) into a dictionary using a search cursor and then updating the main table via an update cursor is by far the fastest method. This is true in v10.0 and below, but is especially true in v10.1+ using ethe data access cursors. In addition to faster processing, this method is far more flexible in that allows for all sorts of error handeling and whatnot through conditional expressions.&lt;BR /&gt;&lt;BR /&gt;For example, say you want to get the fields "ADDRESS" and "CITY" into the main table (key field being "NAME"):&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;#UNTESTED!
lutTbl = r"C:\temp\test.gdb\lookuptable"
mainTbl = "r"C:\temp\test.gdb\maintable"
lutDict= dict([(r[0], (r[1], r[2])) for r in arcpy.da.SearchCursor(lutTbl, ["NAME","ADDRESS","CITY")])
arcpy.AddField_managment(mainTbl, "ADDRESS", "TEXT", "", "", "75")
arcpy.AddField_managment(mainTbl, "CITY", "TEXT", "", "", "30")
updateRows = arcpy.da.UpdateCursor(mainTbl, ["NAME","ADDRESS","CITY"])
for updateRow in updateRows:
&amp;nbsp;&amp;nbsp;&amp;nbsp; nameValue = updateRow[0] 
&amp;nbsp;&amp;nbsp;&amp;nbsp; if nameValue in lutDict:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; updateRow[1] = lutDict[nameValue][1]&amp;nbsp; #Address
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; updateRow[2] = lutDict[nameValue][2]&amp;nbsp; #City
&amp;nbsp;&amp;nbsp;&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Could not locate address/city info for " + str(nameValue) 
&amp;nbsp;&amp;nbsp;&amp;nbsp; updateRows.updateRow(updateRow)
del updateRow, updateRows&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I went ahead and went down this path as it will work better for me in the long run.&amp;nbsp; I have to figure out how to "easily" include updates from additional tables.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only hiccup was something with the index.&amp;nbsp; I'm novice with python so it may be something I should know.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Instead of &lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;updateRow[1] = lutDict[nameValue][1]&lt;/PRE&gt;&lt;SPAN&gt; I had to use &lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;row[1] = PADataDict[PKValue][0]&lt;/PRE&gt;&lt;SPAN&gt;&amp;nbsp; It was almost like once it got into the if statement the index 0 was the first value, not the key.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for the help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Alan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:52:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223538#M7692</guid>
      <dc:creator>AlanToms</dc:creator>
      <dc:date>2021-12-11T10:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: Performance for Append vs Insert Cursor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223539#M7693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Woops - good catch. My code should be:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;updateRow[1] = lutDict[nameValue][0]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;updateRow[2] = lutDict[nameValue][1]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I fixed it in my original above.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway - dictionaries are great. I do all my fancy SQL-like stuff in them now... especially now with 64-bit arcpy. Data tables have kazillions records? No problem and crazy fast!!! No need for fancy RDBMs...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2013 19:26:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223539#M7693</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2013-08-12T19:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: Performance for Append vs Insert Cursor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223540#M7694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;Anyway - dictionaries are great. I do all my fancy SQL-like stuff in them now... especially now with 64-bit arcpy. Data tables have kazillions records? No problem and crazy fast!!! No need for fancy RDBMs...&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I agree 100%.&amp;nbsp; The combination of dictionaries, 64 bit python, and da cursors is ridiculously fast!&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I used to have to manually go into the Assessor's software to run SQL queries to export tables to dbf to tie their records to the county parcel data for our web services...I have since scratched that process and now hack in through an odbc connection, execute the SQL into a dictionary, overwrite the existing dbf table, and then fill in the fields with a da.insert cursor. Now executes as a scheduled task in seconds (used to take a few minutes manually).&amp;nbsp;&amp;nbsp; No one likes manual labor anyways, right? :cool:&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2013 19:57:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223540#M7694</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-08-12T19:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: Performance for Append vs Insert Cursor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223541#M7695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;I'll go with the append.&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;Don't!&lt;BR /&gt;&lt;BR /&gt;Going the Python route (reading the join tables(s) into a dictionary using a search cursor and then updating the main table via an update cursor is by far the fastest method. This is true in v10.0 and below, but is especially true in v10.1+ using ethe data access cursors. In addition to faster processing, this method is far more flexible in that allows for all sorts of error handeling and whatnot through conditional expressions.&lt;BR /&gt;&lt;BR /&gt;For example, say you want to get the fields "ADDRESS" and "CITY" into the main table (key field being "NAME"):&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;lutTbl = r"C:\temp\test.gdb\lookuptable"
mainTbl = "r"C:\temp\test.gdb\maintable"
lutDict= dict([(r[0], (r[1], r[2])) for r in arcpy.da.SearchCursor(lutTbl, ["NAME","ADDRESS","CITY"&lt;SPAN style="font-size:4;"&gt;]&lt;/SPAN&gt;)])
arcpy.AddField_managment(mainTbl, "ADDRESS", "TEXT", "", "", "75")
arcpy.AddField_managment(mainTbl, "CITY", "TEXT", "", "", "30")
updateRows = arcpy.da.UpdateCursor(mainTbl, ["NAME","ADDRESS","CITY"])
for updateRow in updateRows:
&amp;nbsp;&amp;nbsp;&amp;nbsp; nameValue = updateRow[0] 
&amp;nbsp;&amp;nbsp;&amp;nbsp; if nameValue in lutDict:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; updateRow[1] = lutDict[nameValue][0]&amp;nbsp; #Address
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; updateRow[2] = lutDict[nameValue][1]&amp;nbsp; #City
&amp;nbsp;&amp;nbsp;&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Could not locate address/city info for " + str(nameValue) 
&amp;nbsp;&amp;nbsp;&amp;nbsp; updateRows.updateRow(updateRow)
del updateRow, updateRows&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There was a correction I had to make involving an unmatched bracket, which is reflected in the code in this post.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried your code and have to admit I was wrong.&amp;nbsp; The performance of the cursors and dictionary are definitely faster than a Join and the field calculator.&amp;nbsp; The speed difference dramatically increases with each additional field that is updated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was wanting to understand the dictionary key field behavior better.&amp;nbsp; Does the key value have to be unique?&amp;nbsp; I assume it does, or else it wouldn't be called a key.&amp;nbsp; For example, what happens if there are two people named John Smith that have different addresses in the look up table?&amp;nbsp; Does the Address and City value of the second John Smith record replace the values of the first John Smith record in the code you have written or do two Addresses with the John Smith key get created in the look up dictionary?&amp;nbsp; I assume the second record replaces the first.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The answer is important to me, because if the second record replaces the first, that would be a gotcha anytime the look up table key field was not guaranteed to be unique.&amp;nbsp; It would have the same problem ArcMap has dealing with one to many and many to many joins by randomly keeping one matching record in the join table and ignoring all of the others.&amp;nbsp; The only way to resolve the full multi-record relationship with just the John Smith key would then have to involve concatenating or summarizing the secondary field values, just like ArcMap must do to resolve multi-record relationships through a Summary Statistics Join.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also want code that supports multi-field matching between tables that resolves many to many relationships into one to one or many to one relationships through multi-field comparisons without having to concatenate field values in the original tables.&amp;nbsp; In other words, would the dictionary key still have to be the unique concatenation of the Name and Address to preserve both unsummarized records in the look up dictionary and to match the key with the maintbl cursor to resolve the table relationship to get the correct John Smith matching unique multi-field record?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Finally, assuming a multi-field concatenation was needed to preserve the full unsummarized look up table in the dictionary, how would I deal with a true one to many or many to many relationship?&amp;nbsp; In other words, say the look up key had to concatenate John Smith with each address to be unique, but the main table only had John Smith in it.&amp;nbsp; The output I would want would find all of the instances of John Smith in the look up table regardless of what address it is concatenated with and join all of the look up records to the main table records by creating as many duplicates of the main table record needed to produce the full set of matches in the output.&amp;nbsp; How would I write code to do the match between John Smith in the main table and the concatenated keys in the look up dictionary that contained John Smith (assume John Smith is the left most portion of the look up key concatenation)?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:52:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223541#M7695</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2021-12-11T10:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: Performance for Append vs Insert Cursor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223542#M7696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;To answer some of your questions:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Does the key value have to be unique?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes. But you can use tuples as keys as well (aka a composite key) - which of course also have to be unique. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;...what happens if there are two people named John Smith that have different addresses in the look up table?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You have to get creative - I routinely deal with one to many or many to manys by using either composite keys and/or composite look up values. A basic example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;compKeyDict = {('smith, john', 1): "cat street", ('smith, john', 2): "dog street"}
compValDict = {'smith, john': ["cat street", "dog street"]}&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would put a wager in that anything (well pretty much anything) you can do in a RDBMS you can also do much faster and cheaper using dictionaries. All it takes is imagination and a lot of conditional expressions!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If it helps, here's a practical example of making use of a composite value dictionary where the sorted order of the many values are important to the overal analysis: &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/89835-brainteaser-viewshed-wind-turbines-the-more-you-see-the-worse-it-gets...?p=320549&amp;amp;viewfull=1#post320549" rel="nofollow noopener noreferrer" target="_blank"&gt;http://forums.arcgis.com/threads/89835-brainteaser-viewshed-wind-turbines-the-more-you-see-the-worse-it-gets...?p=320549&amp;amp;viewfull=1#post320549&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:52:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223542#M7696</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2021-12-11T10:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: Performance for Append vs Insert Cursor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223543#M7697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;To answer some of your questions:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Yes. But you can use tuples as keys as well (aka a composite key) - which of course also have to be unique. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;You have to get creative - I routinely deal with one to many or many to manys by using either composite keys and/or composite look up values. A basic example:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;compKeyDict = {('smith, john', 1): "cat street", ('smith, john', 2): "dog street"}
compValDict = {'smith, john': ["cat street", "dog street"]}&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;I would put a wager in that anything (well pretty much anything) you can do in a RDBMS you can also do much faster and cheaper using dictionaries. All it takes is imagination and a lot of conditional expressions!&lt;BR /&gt;&lt;BR /&gt;If it helps, here's a practical example of making use of a composite value dictionary where the sorted order of the many values are important to the overal analysis: &lt;A href="http://forums.arcgis.com/threads/89835-brainteaser-viewshed-wind-turbines-the-more-you-see-the-worse-it-gets...?p=320549&amp;amp;viewfull=1#post320549" rel="nofollow noopener noreferrer" target="_blank"&gt;http://forums.arcgis.com/threads/89835-brainteaser-viewshed-wind-turbines-the-more-you-see-the-worse-it-gets...?p=320549&amp;amp;viewfull=1#post320549&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I still don't follow Python syntax.&amp;nbsp; It makes no sense to me.&amp;nbsp; I am a VBA guy and resist Python until it proves its worth, but even then I don't read Python intelligently and the syntax and descriptors are totally unfamiliar.&amp;nbsp; Translate what you are doing into English, since I do not know what you are setting up.&amp;nbsp; Break it down.&amp;nbsp; For example, how do compKeyDict and compValDict relate to each other?&amp;nbsp; Is this the look up or the set up?&amp;nbsp; Are these two different ways of doing the same thing (looks like it to me).&amp;nbsp; It may as well be Martian.&amp;nbsp; What does the colon mean?&amp;nbsp; What are the brackets doing?&amp;nbsp; It is too cryptic.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can't get imaginative or creative if I have no idea what I am creating.&amp;nbsp; I also refuse to go to the Python.org site, since the help it provides is useless and even more confusing than the language.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:52:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223543#M7697</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2021-12-11T10:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: Performance for Append vs Insert Cursor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223544#M7698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For this Append vs Insert Cursor discusssion, where is the data in question being stored (SDE database or other container (e.g. file geodatabase(s))?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does it even matter where the data is stored, as it appears insert cursor is faster than append either way?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Aug 2013 16:23:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223544#M7698</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2013-08-19T16:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: Performance for Append vs Insert Cursor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223545#M7699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Richard - start here: &lt;/SPAN&gt;&lt;A href="https://developers.google.com/edu/python/"&gt;https://developers.google.com/edu/python/&lt;/A&gt;&lt;SPAN&gt;. This is the best intro material I have seen. Watch the videos. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to cut to the dictionary part: &lt;/SPAN&gt;&lt;A href="http://www.youtube.com/watch?v=haycL41dAhg"&gt;http://www.youtube.com/watch?v=haycL41dAhg&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After you get familar with Python data structures, I think my examples will make sense.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Aug 2013 16:44:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223545#M7699</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2013-08-19T16:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: Performance for Append vs Insert Cursor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223546#M7700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You have to get creative - I routinely deal with one to many or many to manys by using either composite keys and/or composite look up values. A basic example:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;compKeyDict = {('smith, john', 1): "cat street", ('smith, john', 2): "dog street"}
compValDict = {'smith, john': ["cat street", "dog street"]}&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So the first is a composite key involving two separate tuple keys with each tuple key associated to one value.&amp;nbsp; The second is a single key with a list composite values.&amp;nbsp; I understand how to access the second structure, having adapted the code you originally provided.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, how would I match the keys of the first example?&amp;nbsp; Would I always have provide a whole tuple for each key or could I get at it by using just the value 'smith, john'?&amp;nbsp; By extension, can the composite key approach involve a list of items, or is it limited to single values and tuples?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:52:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223546#M7700</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2021-12-11T10:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: Performance for Append vs Insert Cursor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223547#M7701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The 1st example was meant to show that if you had multiple John Smiths you could introduce a "counter" in the tuple key to keep seperate occurances of the same key "unique". This 1st example structure, I admit, is not very practical or efficient, but is a possible way of dealing with one-to-manys. I would recomend the second example... However, per the 1st example, to retreive a list of all the John Smith keys, you could use something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;compKeyDict = {('smith, john', 1): "cat street", ('smith, john', 2): "dog street", ('smith, jack', 1): "clown street"}
johnSmithKeysList = [key for key in compKeyDict if "smith, john" == key[0]]&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;can the composite key approach involve a list of items, or is it limited to single values and tuples? &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Per my understanding, the key can only be a single value or a tuple. List are not allowed, since they are mutable, and can be, for example, sorted in place - whcih would screw everything up. Lists of course can be converted to a tuple like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;testList = [1,2,3,4]
testTuple = tuple(list)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:53:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223547#M7701</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2021-12-11T10:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: Performance for Append vs Insert Cursor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223548#M7702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Interesting stuff here...I had never thought to use tuples as a key when worrying about duplicate keys.&amp;nbsp; In the past, I have just gathered a list of unique names, then create a dictionary where the key is one of the unique names and the value is the attributes that match each name.&amp;nbsp; so for example, if I have a table with duplicate names that looks like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]26817[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can do something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
import arcpy

dbf = r'C:\TEMP\Test_Table.dbf'

# Get Unique names
fields = [f.name for f in arcpy.ListFields(dbf) if f.type != 'OID']
with arcpy.da.SearchCursor(dbf, fields) as rows:
&amp;nbsp;&amp;nbsp;&amp;nbsp; table = list(r for r in rows)&amp;nbsp; # table as tuple
names = list(set(r[0] for r in table))

# New dictionary
people_dict = {}

# Make each unique name the key
# return all matches as list for values
for name in names:
&amp;nbsp;&amp;nbsp;&amp;nbsp; people_dict[name] = [r for r in table if r[0] == name]

# print matching records for each name
for name,matches in people_dict.iteritems():
&amp;nbsp;&amp;nbsp;&amp;nbsp; print name,matches
&amp;nbsp;&amp;nbsp;&amp;nbsp; print '\n\n'
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This will print out:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Alex Olsen [(u'Alex Olsen', u'516 N Main St', u'West Branch', 61500.0)]



Shelly Fields [(u'Shelly Fields', u'618 N Ward St', u'Macomb', 53500.0)]



John Smith [(u'John Smith', u'1321 400th St', u'Tipton', 54000.0), (u'John Smith', u'222 E Third St', u'Lisbon', 47800.0), (u'John Smith', u'212 S 1st St', u'Tipton', 80000.0)]



Steve Johnson [(u'Steve Johnson', u'447 S Fisk St', u'Macomb', 43400.0), (u'Steve Johnson', u'214 S 1st St', u'Tipton', 72000.0)]

&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Basically all I have done is create sort of an in memory pivot table, where I can supply a name to get all matching attributes.&amp;nbsp; So if I just want to find all the matching addresses,city for each name I can do this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
# print all address, city for each match to name
for name,matches in people_dict.iteritems():
&amp;nbsp;&amp;nbsp;&amp;nbsp; print name, [(mat[1],mat[2]) for mat in matches]
&amp;nbsp;&amp;nbsp;&amp;nbsp; print '\n\n'
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This will print out:&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;BR /&gt;Alex Olsen [(u'516 N Main St', u'West Branch')]&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Shelly Fields [(u'618 N Ward St', u'Macomb')]&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;John Smith [(u'1321 400th St', u'Tipton'), (u'222 E Third St', u'Lisbon'), (u'212 S 1st St', u'Tipton')]&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Steve Johnson [(u'447 S Fisk St', u'Macomb'), (u'214 S 1st St', u'Tipton')]&lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Or you can specifically search out "John Smith" like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
# print address,city for John Smith
for name,attributes in people_dict.iteritems():
&amp;nbsp;&amp;nbsp;&amp;nbsp; if name == 'John Smith':
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for att in attributes:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print att[1:3]
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;This will print:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;(u'1321 400th St', u'Tipton')&lt;BR /&gt;(u'222 E Third St', u'Lisbon')&lt;BR /&gt;(u'212 S 1st St', u'Tipton')&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Finally, you mentioned you wanted to do some summary statistics for the records...In this case, I can easily summarize the amount of income for the 4 names like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
# Get sum of income for each name
for name,matches in people_dict.iteritems():
&amp;nbsp;&amp;nbsp;&amp;nbsp; print name, sum(mat[-1] for mat in matches)
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This will print:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Alex Olsen 61500.0&lt;BR /&gt;Shelly Fields 53500.0&lt;BR /&gt;John Smith 181800.0&lt;BR /&gt;Steve Johnson 115400.0&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Of course, the above is a useless statistic, but was just done to show an example of how this can be done.&amp;nbsp; I hope these examples can give you some more ideas at least.&amp;nbsp; Also, you can choose to remove the 'unicoding' as well.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:53:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223548#M7702</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T10:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: Performance for Append vs Insert Cursor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223549#M7703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Chris and Caleb:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for exploring the dictionary syntax more fully and clarifying some of the options I have for working with them.&amp;nbsp; The dict pivot table emulation is interesting and would probably deal with my full many to.many relationship preservation question the best.&amp;nbsp; The summary example also could prove useful.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just one more example would be appreciated.&amp;nbsp; Summary Statistics cannot get the Min or Max date of a table, since date fields are unavailable for summary.&amp;nbsp; Sometimes I would want the Max date associated with the unique case of each name or other identifier.&amp;nbsp; Typically when I do get this information I then only want the related information of just the record with that max date for the unique ID.&amp;nbsp; How would I do something like that?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So if I had something like (also treat the Last Name and First Name as separate fields):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Smith, John,&amp;nbsp; Jan 10, 2013,&amp;nbsp; Applied&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Smith, John,&amp;nbsp; Feb 3, 2013,&amp;nbsp; Assigned&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Smith, John,&amp;nbsp; Mar 25, 2013,&amp;nbsp; Tested&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Smith, John,&amp;nbsp; Jun 11, 2013,&amp;nbsp; Hired&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Smith, Jack,&amp;nbsp; Jan 10, 2013,&amp;nbsp; Applied&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Smith, Jack,&amp;nbsp; Feb 7, 2013,&amp;nbsp; Assigned&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Smith, Jack,&amp;nbsp; Mar 25, 2013,&amp;nbsp; Tested&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Smith, Jack,&amp;nbsp; Jun 5, 2013,&amp;nbsp; Rejected&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Smith, Kim,&amp;nbsp; Jan 10, 2013,&amp;nbsp; Applied&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Smith, Kim,&amp;nbsp; Feb 12, 2013,&amp;nbsp; Rejected&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would want:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Smith, John,&amp;nbsp; Jun 11, 2013,&amp;nbsp; Hired&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Smith, Jack,&amp;nbsp; Jun 5, 2013,&amp;nbsp; Rejected&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Smith, Kim,&amp;nbsp; Feb 12, 2013,&amp;nbsp; Rejected&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Of course the real data would be many more unique cases with many more data records.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A one shot way to do this kind of summary would have implications for many of my other similar workflows where I first have to summarize a value (say the Min From measure and Max To measure of a set of routes) and then get the associated data for just the record(s) that match that min or max value for that case (for example the house number associated with the min From measure and the max To measure of each route).&amp;nbsp; Using geoprocesssing this is a 3 step process at least.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Aug 2013 14:24:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223549#M7703</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2013-08-20T14:24:06Z</dc:date>
    </item>
    <item>
      <title>Re: Performance for Append vs Insert Cursor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223550#M7704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here's an example of sorting a one-to-many by the date value. While the ESRI summary tools seem to struggle, Python does sort datetime objects correctly I think.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/90090-List-Broken-Data-Source-s-Path?p=319811&amp;amp;viewfull=1#post319811"&gt;http://forums.arcgis.com/threads/90090-List-Broken-Data-Source-s-Path?p=319811&amp;amp;viewfull=1#post319811&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Aug 2013 15:14:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/performance-for-append-vs-insert-cursor/m-p/223550#M7704</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2013-08-20T15:14:42Z</dc:date>
    </item>
  </channel>
</rss>

