<?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: SQL Server not using spatial indexes for ArcGISDynamicMapServiceLayer requests in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/sql-server-not-using-spatial-indexes-for/m-p/251883#M9701</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" class="" data-userid="79782" data-username="steveburdette" href="https://community.esri.com/people/steveburdette"&gt;Steve Burdette&lt;/A&gt;, have you ever solved your problem? I have the same situation with the same platform - SQL Server 2012 and ArcGIS Server 10.3.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Feb 2018 11:41:37 GMT</pubDate>
    <dc:creator>MladenSimic1</dc:creator>
    <dc:date>2018-02-20T11:41:37Z</dc:date>
    <item>
      <title>SQL Server not using spatial indexes for ArcGISDynamicMapServiceLayer requests</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/sql-server-not-using-spatial-indexes-for/m-p/251879#M9697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I have a Windows Server 2012 R2 running SQL Server 2012 R2 and ESRI Server 10.3.&amp;nbsp; The server has 16 dual-core Xeon processors and 96 GB of RAM.&amp;nbsp; I have a web application that is using ArcGISDynamicMapServiceLayers to display state-wide lines and points, including labels for both lines and points.&amp;nbsp; We restrict the display of the lines/points until the user is zoomed to an appropriate level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue that we are seeing is every time the web application requests data, the SQL Server CPU load goes to 100%.&amp;nbsp; When one user is using the application performance is not bad, but when several folks start using it performance degrades quickly.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In analyzing the queries that are being used, it doesn't appear that SQL Server is using the spatial indexes at all.&amp;nbsp; I've tried several things, including setting MAXDOP to 1, but nothing seems to work and SQL Server takes the CPU to 100% every time the application requests data.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone experienced this issue and been able to find a resolution?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 May 2016 14:15:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/sql-server-not-using-spatial-indexes-for/m-p/251879#M9697</guid>
      <dc:creator>SteveBurdette</dc:creator>
      <dc:date>2016-05-20T14:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Server not using spatial indexes for ArcGISDynamicMapServiceLayer requests</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/sql-server-not-using-spatial-indexes-for/m-p/251880#M9698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What storage format? Binary, Geography, or Geometry? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 May 2016 19:11:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/sql-server-not-using-spatial-indexes-for/m-p/251880#M9698</guid>
      <dc:creator>ThomasColson</dc:creator>
      <dc:date>2016-05-20T19:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Server not using spatial indexes for ArcGISDynamicMapServiceLayer requests</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/sql-server-not-using-spatial-indexes-for/m-p/251881#M9699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Our shapes are stored as Geometry data types.&amp;nbsp; I created the Feature Class using the System Tools in ArcCatalog.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 May 2016 19:29:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/sql-server-not-using-spatial-indexes-for/m-p/251881#M9699</guid>
      <dc:creator>SteveBurdette</dc:creator>
      <dc:date>2016-05-20T19:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Server not using spatial indexes for ArcGISDynamicMapServiceLayer requests</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/sql-server-not-using-spatial-indexes-for/m-p/251882#M9700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Shouldn't be drawing that slow. Are you able to run jmeter from a client and generate a load, and run SQL trace on the SQL server....then run that through Database Tuning Adviser?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 May 2016 12:28:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/sql-server-not-using-spatial-indexes-for/m-p/251882#M9700</guid>
      <dc:creator>ThomasColson</dc:creator>
      <dc:date>2016-05-21T12:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Server not using spatial indexes for ArcGISDynamicMapServiceLayer requests</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/sql-server-not-using-spatial-indexes-for/m-p/251883#M9701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" class="" data-userid="79782" data-username="steveburdette" href="https://community.esri.com/people/steveburdette"&gt;Steve Burdette&lt;/A&gt;, have you ever solved your problem? I have the same situation with the same platform - SQL Server 2012 and ArcGIS Server 10.3.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Feb 2018 11:41:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/sql-server-not-using-spatial-indexes-for/m-p/251883#M9701</guid>
      <dc:creator>MladenSimic1</dc:creator>
      <dc:date>2018-02-20T11:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Server not using spatial indexes for ArcGISDynamicMapServiceLayer requests</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/sql-server-not-using-spatial-indexes-for/m-p/251884#M9702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I rarely use SQL for "Map-only" applications, as the performance of the geography/geometry data-type is horrible. For your application, consider some Python magic that exports your SQL to a FGDB (perhaps nightly), then hang your map service(s) off the FGDB. You could also do something similar where a hosted service on AGOL is updated nightly (or hourly) with data from your SQL instance. You will chase SQL spatial performance to no end, and never be satisfied with it's display speeds.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Feb 2018 12:51:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/sql-server-not-using-spatial-indexes-for/m-p/251884#M9702</guid>
      <dc:creator>ThomasColson</dc:creator>
      <dc:date>2018-02-20T12:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Server not using spatial indexes for ArcGISDynamicMapServiceLayer requests</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/sql-server-not-using-spatial-indexes-for/m-p/251885#M9703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I never really resolved this problem...if we have a lot of features on the map we get the user to narrow down their search before we start displaying a lot of data (even using the dynamic map image service layer).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Feb 2018 14:16:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/sql-server-not-using-spatial-indexes-for/m-p/251885#M9703</guid>
      <dc:creator>SteveBurdette</dc:creator>
      <dc:date>2018-02-20T14:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Server not using spatial indexes for ArcGISDynamicMapServiceLayer requests</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/sql-server-not-using-spatial-indexes-for/m-p/251886#M9704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's great feedback Thomas...thanks so much.&amp;nbsp; The applications that I'm referring to are letting the user add/edit/delete points/attributes and they need to see the results immediately, so the Python export wouldn't work for us in this case.&amp;nbsp; Great idea, though.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Feb 2018 14:17:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/sql-server-not-using-spatial-indexes-for/m-p/251886#M9704</guid>
      <dc:creator>SteveBurdette</dc:creator>
      <dc:date>2018-02-20T14:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Server not using spatial indexes for ArcGISDynamicMapServiceLayer requests</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/sql-server-not-using-spatial-indexes-for/m-p/251887#M9705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see&amp;nbsp;&lt;A href="https://support.microsoft.com/en-in/help/2757097/sql-2012-query-optimizer-may-not-choose-to-use-a-spatial-index"&gt;https://support.microsoft.com/en-in/help/2757097/sql-2012-query-optimizer-may-not-choose-to-use-a-spatial-index&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Feb 2018 16:14:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/sql-server-not-using-spatial-indexes-for/m-p/251887#M9705</guid>
      <dc:creator>nicogis</dc:creator>
      <dc:date>2018-02-20T16:14:41Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Server not using spatial indexes for ArcGISDynamicMapServiceLayer requests</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/sql-server-not-using-spatial-indexes-for/m-p/251888#M9706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There this:&amp;nbsp;&lt;A href="https://community.esri.com/blogs/HackingArcSDE/2015/07/07/witch-magic-snake-oil-medicine-and-spatial-index-tuning"&gt;/blogs/HackingArcSDE/2015/07/07/witch-magic-snake-oil-medicine-and-spatial-index-tuning&lt;/A&gt;&amp;nbsp;, or you can add several indexes of varying size and density, then monitor using your most common view queries.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Feb 2018 18:13:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/sql-server-not-using-spatial-indexes-for/m-p/251888#M9706</guid>
      <dc:creator>ThomasColson</dc:creator>
      <dc:date>2018-02-20T18:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Server not using spatial indexes for ArcGISDynamicMapServiceLayer requests</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/sql-server-not-using-spatial-indexes-for/m-p/251889#M9707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And....(crossing my fingers behind my back), Editing a SQL-based feature service in Pro is easily 10X faster than it is in Arc. Everything else is 10X slower....but at least they improved editing....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And....can you define "Web Application" and your environment?&amp;nbsp;Portal, AGOL, WAB SDK? Is the feature service over HTTPS? (It should). What type of authentication? SSL and IWA will put a big performance hit on a feature service. How many instances do you have started, versus max? I find that keeping N+2, where N is the number of users I &lt;EM&gt;&lt;STRONG&gt;NORMALLY&lt;/STRONG&gt;&lt;/EM&gt; expect to use the service, keeps the CPU from spiking whenever a new instance spools up. On SQL, try moving the log and temp files to a physically different disk. On the GIS server and the SQL server, run this for (1 hour max!) &lt;A class="link-titled" href="https://github.com/clinthuffman/PAL" title="https://github.com/clinthuffman/PAL"&gt;GitHub - clinthuffman/PAL: Performance Analysis of Logs (PAL) tool&lt;/A&gt;&amp;nbsp;when you have a bunch of users both starting the app for the first time, and heavily using it. I used this with success to justify an upgrade to the SAN that the SQL files were on. Also use SQL profiler to see how/if attribute indexes are needed, or performing poorly. How often are you backing up the DB and rebuilding indexes? If you're not backing up (full) nightly, and NOT truncating the transaction log, just viewing and panning an editable feature service will fill up that log no time.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Feb 2018 18:25:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/sql-server-not-using-spatial-indexes-for/m-p/251889#M9707</guid>
      <dc:creator>ThomasColson</dc:creator>
      <dc:date>2018-02-20T18:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Server not using spatial indexes for ArcGISDynamicMapServiceLayer requests</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/sql-server-not-using-spatial-indexes-for/m-p/251890#M9708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have been able to resolve this behavior in some cases but there are several paths to get to this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To provide a proper response I need to know how you got to this point.&amp;nbsp; Sometimes this is a question of database optimization, other times it means you have hit certain fundamental limitations of SQL spatial data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Questions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How many spatial indexes do you have on the tables?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How many rows in the tables?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are your indexes being rebuilt on a regular basis?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you using geometry_grid or geometry_autogrid spatial indexes?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is your database under memory pressure?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are your log and data files on the same drive or on separate drives?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Feb 2018 19:38:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/sql-server-not-using-spatial-indexes-for/m-p/251890#M9708</guid>
      <dc:creator>DavidRUtledge1</dc:creator>
      <dc:date>2018-02-21T19:38:09Z</dc:date>
    </item>
  </channel>
</rss>

