<?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 Python Optimization Techniques in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/python-optimization-techniques/m-p/114487#M3913</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Forum Folk,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am writing to ask for suggestions for speeding up my script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I currently have a 2 tables in a File Geodatabase.&amp;nbsp; The first [TABLE1] has approximately 2000 records and the second [TABLE2] approximately 200000 records. [TABLE2] contains a foreign key from [TABLE1]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am currently using a SearchCursor with a Where statement to retrieve the relevant records from [TABLE2] for each row of [TABLE1].&amp;nbsp; Even though it has been suggested by ESRI to perform this process, it is taking approximately 1-2 seconds for the SearchCursor to execute and return its result set.&amp;nbsp; Each result set consists of between 100-2000 records.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The execution time seems incredibly slow for this operation.&amp;nbsp; I feel I may be missing a tweak that would speed this up, is the SearchCursor performing any license checks or validation checks in the background each time it is executed?&amp;nbsp; I have written some code to load [TABLE2] into a python dictionary to perform the look up on the foreign key.&amp;nbsp; There was a marked speed up.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Your thoughts?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Aug 2011 16:03:36 GMT</pubDate>
    <dc:creator>AndrwSmith</dc:creator>
    <dc:date>2011-08-19T16:03:36Z</dc:date>
    <item>
      <title>Python Optimization Techniques</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/python-optimization-techniques/m-p/114487#M3913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Forum Folk,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am writing to ask for suggestions for speeding up my script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I currently have a 2 tables in a File Geodatabase.&amp;nbsp; The first [TABLE1] has approximately 2000 records and the second [TABLE2] approximately 200000 records. [TABLE2] contains a foreign key from [TABLE1]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am currently using a SearchCursor with a Where statement to retrieve the relevant records from [TABLE2] for each row of [TABLE1].&amp;nbsp; Even though it has been suggested by ESRI to perform this process, it is taking approximately 1-2 seconds for the SearchCursor to execute and return its result set.&amp;nbsp; Each result set consists of between 100-2000 records.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The execution time seems incredibly slow for this operation.&amp;nbsp; I feel I may be missing a tweak that would speed this up, is the SearchCursor performing any license checks or validation checks in the background each time it is executed?&amp;nbsp; I have written some code to load [TABLE2] into a python dictionary to perform the look up on the foreign key.&amp;nbsp; There was a marked speed up.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Your thoughts?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2011 16:03:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/python-optimization-techniques/m-p/114487#M3913</guid>
      <dc:creator>AndrwSmith</dc:creator>
      <dc:date>2011-08-19T16:03:36Z</dc:date>
    </item>
  </channel>
</rss>

