<?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: ArcGIS Server Feature Service vs Map Service to query large number of records using JavaScript API in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/arcgis-server-feature-service-vs-map-service-to/m-p/661085#M4499</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I also have this question, though my focus is on the main question from a performance standpoint and when the data is stored in SDE (Oracle):&lt;/P&gt;&lt;P&gt;Which is the better solution in terms of&amp;nbsp;performance and resource usage on the AGS Server&amp;nbsp;- a max record count of 400K on a map service or creating a feature service for the layer?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Aug 2017 05:42:44 GMT</pubDate>
    <dc:creator>JTessier</dc:creator>
    <dc:date>2017-08-24T05:42:44Z</dc:date>
    <item>
      <title>ArcGIS Server Feature Service vs Map Service to query large number of records using JavaScript API</title>
      <link>https://community.esri.com/t5/developers-questions/arcgis-server-feature-service-vs-map-service-to/m-p/661084#M4498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are weighing the relative impact of serving a large data set in ArcGIS server as a map service with a very large MaxRecordCount or as a feature service with a smaller MaxRecordCount.&amp;nbsp; There is no need to edit the data via the feature service - the service is meant to be for display and query purposes, not editing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is - which is the better solution - a max record count of 400K on a map service or creating a feature service for the layer?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have a statewide parcel layer with about 400K records that is hosted as a map service in Esri Managed Cloud Services with a MaxRecordCount of 5000.&amp;nbsp; A consultant is developing a custom app using the JavaScript API in which there is a need to query the entire dataset.&amp;nbsp; When MaxRecordCount is 5000, any query (using QueryTask) against a layer (e.g., parcels) in that service will only return the first 5000 rows&amp;nbsp; – for example, if the application sends a query for all parcels greater than 1000 acres, and we then want to further filter the results (e.g., those parcels having zoning of “Urban”), the second query/filter will only be applied to the first 5000 records returned – even if there are more parcels meeting the criteria - so the results will be incomplete.&amp;nbsp; When we increase the MaxRecordCount to a number larger than the total number of state wide parcels (~377K), like 400K, the queries will return the complete set of features the meet the criteria. However, we don't really want to increase the MaxRecordCount to 400K.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Esri suggested the solution below, which requires a feature service rather than a map service:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;SPAN style="font-size: 10.5pt; color: black;"&gt;If the server supports&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/3/jsapi/featurelayer-amd.html#advancedquerycapabilities"&gt;pagination&lt;/A&gt;, the FeatureSet returned as a result of executing the query task contains&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/3/jsapi/featureset-amd.html#exceededtransferlimit"&gt;exceededTransferLimit&lt;/A&gt;&amp;nbsp;boolean. When that boolean is true, it indicates there are more features that matched your query than what was returned. Now, you can use&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/3/jsapi/query-amd.html#start"&gt;Query.start&lt;/A&gt;&amp;nbsp;and&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/3/jsapi/query-amd.html#num"&gt;Query.num&lt;/A&gt;&amp;nbsp;parameters to fetch those additional features that satisfied your query. Repeat the same query with new values for “start” and “num” parameters until FeatureSet.exceededTransferLimit becomes false – at which point you would have fetched all features that satisfied your query.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;SPAN style="font-size: 10.5pt; color: black;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;SPAN style="font-size: 10.5pt; color: black;"&gt;Your sequence would like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;SPAN style="font-size: 10.5pt; color: black;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;SPAN style="font-size: 10.5pt; color: black;"&gt;Query 1:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;SPAN style="font-size: 10.5pt; color: black;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;SPAN style="font-size: 10.5pt; color: black;"&gt;start = 0; num = &amp;lt;MaxRecordCount&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;SPAN style="font-size: 10.5pt; color: black;"&gt;returns FeatureSet.exceededTransferLimit = true&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;SPAN style="font-size: 10.5pt; color: black;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;SPAN style="font-size: 10.5pt; color: black;"&gt;start = 1 * &amp;lt;MaxRecordCount&amp;gt;; num = &amp;lt;MaxRecordCount&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;SPAN style="font-size: 10.5pt; color: black;"&gt;returns FeatureSet.exceededTransferLimit = true&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;SPAN style="font-size: 10.5pt; color: black;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;SPAN style="font-size: 10.5pt; color: black;"&gt;start = 2 * &amp;lt;MaxRecordCount&amp;gt;; num = &amp;lt;MaxRecordCount&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;SPAN style="font-size: 10.5pt; color: black;"&gt;returns FeatureSet.exceededTransferLimit = true&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;SPAN style="font-size: 10.5pt; color: black;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;SPAN style="font-size: 10.5pt; color: black;"&gt;…and so on until exceededTransferLimit becomes false.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;/P&gt;&lt;P style="margin-left: .5in;"&gt;&lt;SPAN style="font-size: 10.5pt; color: black;"&gt;Would appreciate any guidance or insights...&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jun 2017 20:32:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/arcgis-server-feature-service-vs-map-service-to/m-p/661084#M4498</guid>
      <dc:creator>JoanDelos_Santos</dc:creator>
      <dc:date>2017-06-13T20:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Server Feature Service vs Map Service to query large number of records using JavaScript API</title>
      <link>https://community.esri.com/t5/developers-questions/arcgis-server-feature-service-vs-map-service-to/m-p/661085#M4499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I also have this question, though my focus is on the main question from a performance standpoint and when the data is stored in SDE (Oracle):&lt;/P&gt;&lt;P&gt;Which is the better solution in terms of&amp;nbsp;performance and resource usage on the AGS Server&amp;nbsp;- a max record count of 400K on a map service or creating a feature service for the layer?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Aug 2017 05:42:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/arcgis-server-feature-service-vs-map-service-to/m-p/661085#M4499</guid>
      <dc:creator>JTessier</dc:creator>
      <dc:date>2017-08-24T05:42:44Z</dc:date>
    </item>
  </channel>
</rss>

