<?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: Accessing view from Arcpy (ArcGisPro) is very slow in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/accessing-view-from-arcpy-arcgispro-is-very-slow/m-p/1047454#M60801</link>
    <description>&lt;P&gt;That version of arcgis Pro is a couple of versions old.&amp;nbsp; And differences in access times between arcmap and Pro have been noted many times.&lt;/P&gt;&lt;P&gt;A better test is to work with local copies of the data leaving server issues out altogether&lt;/P&gt;&lt;P&gt;Read this to see if there is anything that can help your situation&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-pro-documents/troubleshooting-performance-issues-in-arcgis-pro/ta-p/1025516/jump-to/first-unread-message" target="_blank"&gt;Troubleshooting Performance Issues in ArcGIS Pro - Esri Community&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Apr 2021 08:57:32 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2021-04-15T08:57:32Z</dc:date>
    <item>
      <title>Accessing view from Arcpy (ArcGisPro) is very slow</title>
      <link>https://community.esri.com/t5/python-questions/accessing-view-from-arcpy-arcgispro-is-very-slow/m-p/1047452#M60800</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;My DB is hosted on a MS SQL server. I have created a view (its very simple just a join of 2 tables )&lt;/P&gt;&lt;P&gt;When I access tje view from older version of arcpy it is fast, but when i try from newer version it very slow.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is some example code&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy
import sys
from datetime import datetime

version = arcpy.GetInstallInfo()
pyVersion = sys.version

print("ProductName: {}".format(version['ProductName']))
print("Version: {}".format(version['Version']))
print("Python version: {}".format(pyVersion))
start = datetime.now()

arcpy.GetCount_management(r"C:\Connections\SDE@MyDB.sde\simpelView")
end =  datetime.now()

print(end-start)&lt;/LI-CODE&gt;&lt;P&gt;When i run the code from the old version of python af arcpy this is the result:&lt;/P&gt;&lt;P&gt;ProductName: Desktop&lt;BR /&gt;Version: 10.2.1&lt;BR /&gt;Python version: 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)]&lt;BR /&gt;0:00:17.431000&lt;/P&gt;&lt;P&gt;I took about 17sec&lt;/P&gt;&lt;P&gt;Now i execute the same code, on the same computer, with the same connectionfile, but using newer version of arcpy and python&lt;/P&gt;&lt;P&gt;ProductName: ArcGISPro&lt;BR /&gt;Version: 2.5&lt;BR /&gt;Python version: 3.6.9 |Anaconda, Inc.| (default, Jul 30 2019, 14:00:49) [MSC v.1915 64 bit (AMD64)]&lt;BR /&gt;3:00:01.225900&lt;/P&gt;&lt;P&gt;I takes 3 hours.&lt;/P&gt;&lt;P&gt;Why is there such a huge diffrence?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 08:52:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/accessing-view-from-arcpy-arcgispro-is-very-slow/m-p/1047452#M60800</guid>
      <dc:creator>leonoestergaard</dc:creator>
      <dc:date>2021-04-15T08:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing view from Arcpy (ArcGisPro) is very slow</title>
      <link>https://community.esri.com/t5/python-questions/accessing-view-from-arcpy-arcgispro-is-very-slow/m-p/1047454#M60801</link>
      <description>&lt;P&gt;That version of arcgis Pro is a couple of versions old.&amp;nbsp; And differences in access times between arcmap and Pro have been noted many times.&lt;/P&gt;&lt;P&gt;A better test is to work with local copies of the data leaving server issues out altogether&lt;/P&gt;&lt;P&gt;Read this to see if there is anything that can help your situation&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-pro-documents/troubleshooting-performance-issues-in-arcgis-pro/ta-p/1025516/jump-to/first-unread-message" target="_blank"&gt;Troubleshooting Performance Issues in ArcGIS Pro - Esri Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 08:57:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/accessing-view-from-arcpy-arcgispro-is-very-slow/m-p/1047454#M60801</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-04-15T08:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing view from Arcpy (ArcGisPro) is very slow</title>
      <link>https://community.esri.com/t5/python-questions/accessing-view-from-arcpy-arcgispro-is-very-slow/m-p/1050563#M60882</link>
      <description>&lt;P&gt;While my views was simple, I didnt realize that I joined it with another view. The other view contained a where x not in (select x from y)&amp;nbsp; This caused the very poor performance. I changed the view to use "except" instead of the subquery in the where, at now i performs very nice&lt;/P&gt;</description>
      <pubDate>Fri, 23 Apr 2021 09:47:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/accessing-view-from-arcpy-arcgispro-is-very-slow/m-p/1050563#M60882</guid>
      <dc:creator>leonoestergaard</dc:creator>
      <dc:date>2021-04-23T09:47:52Z</dc:date>
    </item>
  </channel>
</rss>

