Hi
My DB is hosted on a MS SQL server. I have created a view (its very simple just a join of 2 tables )
When I access tje view from older version of arcpy it is fast, but when i try from newer version it very slow.
Here is some example code
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)
When i run the code from the old version of python af arcpy this is the result:
ProductName: Desktop
Version: 10.2.1
Python version: 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)]
0:00:17.431000
I took about 17sec
Now i execute the same code, on the same computer, with the same connectionfile, but using newer version of arcpy and python
ProductName: ArcGISPro
Version: 2.5
Python version: 3.6.9 |Anaconda, Inc.| (default, Jul 30 2019, 14:00:49) [MSC v.1915 64 bit (AMD64)]
3:00:01.225900
I takes 3 hours.
Why is there such a huge diffrence?