This is the technical article describing the problem:
Problem: Performance of SQL Server views degrades after upgrading to ArcGIS 10.4
At version 10.6.1 this is still the same.
We have number of views coming from a non-spatial SQL Server 2016 database that we publish to ArcGIS server. Some of the views join multiple tables with millions of records. The final record count of the views is 100K-500K.
Adding one of these views to ArcMap is fairly quick, but displaying as XY event layer takes hours if the application doesn't crash. If layer is successfully added, then publishing runs for a long time (30 minutes +) and fails. The tables have been indexed. I added more indexes and made sure I only have "Index Seeks". Still it took 30 minutes to create the XY layer with the view with the least records.
I have opened a case with ESRI, and so far the solutions I have been given are to enable that database as a geodatabase or export the data to a geodatabase (which took 45 minutes). None of these are possible, so I am turning to you, guys, for help.
I am currently testing the same scenario in ArcGIS Pro 2.3, and it has been running for hour and a half the process of creating an XY event layer from the view with 100K.
We have been holding on to 10.3.1 for dear life, but with the upgrade of the OS we have to move on, and it doesn't look pretty.
If you have found a solution, please, advice!
Thank you!