<?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 Bad count-only query performance on layer with 600'000 polygons in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/bad-count-only-query-performance-on-layer-with-600/m-p/16290#M603</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One of our layers contains approximately 600'000 polygons that should be displayed as a featurelayer in our application based on the 4.4 JSAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Strangely, since the 4.3 version of the API, a count-only request to the map service is performed before it starts loading the features. It occured to me that the performance of this count-only query is very bad! It takes around 50 seconds just &amp;nbsp;to return the amount of records within that layer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Further analysis with an SQL profiler has shown that a count-only query seems to be implemented in a strange way such that it translates to the following oracle / sql query:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select ID, spatialdata from (SQL_QUERY DEFINED IN THE MAP SERVICE / LAYER)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would have expected a "select count()" here, but instead, it simply selects the ID and spatial field on the query defined in the map service, and probably counts the returned records manually. As a result, before we can&amp;nbsp;load the layer, we have to wait 50 seconds just to wait for this count-query to finish.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I the only one with this problem? Is this a known bug? Is there any workaround?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Sep 2017 09:19:07 GMT</pubDate>
    <dc:creator>KevinHaeni</dc:creator>
    <dc:date>2017-09-04T09:19:07Z</dc:date>
    <item>
      <title>Bad count-only query performance on layer with 600'000 polygons</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/bad-count-only-query-performance-on-layer-with-600/m-p/16290#M603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One of our layers contains approximately 600'000 polygons that should be displayed as a featurelayer in our application based on the 4.4 JSAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Strangely, since the 4.3 version of the API, a count-only request to the map service is performed before it starts loading the features. It occured to me that the performance of this count-only query is very bad! It takes around 50 seconds just &amp;nbsp;to return the amount of records within that layer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Further analysis with an SQL profiler has shown that a count-only query seems to be implemented in a strange way such that it translates to the following oracle / sql query:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select ID, spatialdata from (SQL_QUERY DEFINED IN THE MAP SERVICE / LAYER)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would have expected a "select count()" here, but instead, it simply selects the ID and spatial field on the query defined in the map service, and probably counts the returned records manually. As a result, before we can&amp;nbsp;load the layer, we have to wait 50 seconds just to wait for this count-query to finish.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I the only one with this problem? Is this a known bug? Is there any workaround?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Sep 2017 09:19:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/bad-count-only-query-performance-on-layer-with-600/m-p/16290#M603</guid>
      <dc:creator>KevinHaeni</dc:creator>
      <dc:date>2017-09-04T09:19:07Z</dc:date>
    </item>
    <item>
      <title>Re: Bad count-only query performance on layer with 600'000 polygons</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/bad-count-only-query-performance-on-layer-with-600/m-p/16291#M604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kevin, I converted this from a discussion to a question. Also, tagging &lt;A href="https://community.esri.com/community/developers/web-developers/arcgis-api-for-javascript?sr=search&amp;amp;searchId=4f268e26-efe7-49b9-94b5-bd4c8d3f720d&amp;amp;searchIndex=1"&gt;https://community.esri.com/community/developers/web-developers/arcgis-api-for-javascript?sr=search&amp;amp;searchId=4f268e26-efe7-49b9-94b5-bd4c8d3f720d&amp;amp;searchIndex=1&lt;/A&gt;‌ for more exposure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it may help to know what version of ArcGIS Server you are using, and if you recently upgraded, from what to what?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Sep 2017 18:44:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/bad-count-only-query-performance-on-layer-with-600/m-p/16291#M604</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2017-09-04T18:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: Bad count-only query performance on layer with 600'000 polygons</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/bad-count-only-query-performance-on-layer-with-600/m-p/16292#M605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rebecca&lt;/P&gt;&lt;P&gt;Thank you! It seems we have version 10.4.1 installed!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Sep 2017 06:21:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/bad-count-only-query-performance-on-layer-with-600/m-p/16292#M605</guid>
      <dc:creator>KevinHaeni</dc:creator>
      <dc:date>2017-09-05T06:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: Bad count-only query performance on layer with 600'000 polygons</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/bad-count-only-query-performance-on-layer-with-600/m-p/16293#M606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah and we haven't upgraded the server so far.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Sep 2017 06:22:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/bad-count-only-query-performance-on-layer-with-600/m-p/16293#M606</guid>
      <dc:creator>KevinHaeni</dc:creator>
      <dc:date>2017-09-05T06:22:01Z</dc:date>
    </item>
  </channel>
</rss>

