<?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 Speed up complex layer definition SQL on ArcGIS Server filegeodatabase in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/speed-up-complex-layer-definition-sql-on-arcgis/m-p/68630#M6005</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Very complex question.&lt;/P&gt;&lt;P&gt;We have data published to ArcGIS Server as a map service (5 mil polygons in one filegeodatabase).&lt;/P&gt;&lt;P&gt;We need to filter it by fields.&lt;/P&gt;&lt;P&gt;The current structure contains fields that have pipe separated values, example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AreaID AreaName&amp;nbsp;ClientsNames&lt;/P&gt;&lt;P&gt;5 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;GreenPoly &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;John Smith&lt;SPAN style="color: #000000;"&gt;&lt;A href="mailto:abs@gmail|abc@yahoo.com|abc@hotmail.com" style="color: #000000;"&gt;|Steve White|&lt;/A&gt;David Black&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Performance is slow &amp;nbsp;because we use "like"for this field "ClientsNames" in a layer definition to filter the layer.&lt;/P&gt;&lt;P&gt;example :&lt;/P&gt;&lt;P&gt;var layerDefinition;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;layerDefinition[0] = "ClientsNames like '%John Smith%' OR ClientsNames like '%&lt;A href="mailto:abs@gmail|abc@yahoo.com|abc@hotmail.com" style="color: #000000;"&gt;Steve White&lt;/A&gt;%'";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;setLayerDefinition(&lt;SPAN&gt;layerDefinition&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is possible improvement of performance:&lt;/P&gt;&lt;P&gt;1) restructure the data&lt;/P&gt;&lt;P&gt;2) use relationship class (if possible for file geodatabase on ArcGIS Server)&lt;/P&gt;&lt;P&gt;3) ??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Nov 2016 22:41:14 GMT</pubDate>
    <dc:creator>PitersonPaulgek</dc:creator>
    <dc:date>2016-11-30T22:41:14Z</dc:date>
    <item>
      <title>Speed up complex layer definition SQL on ArcGIS Server filegeodatabase</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/speed-up-complex-layer-definition-sql-on-arcgis/m-p/68630#M6005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Very complex question.&lt;/P&gt;&lt;P&gt;We have data published to ArcGIS Server as a map service (5 mil polygons in one filegeodatabase).&lt;/P&gt;&lt;P&gt;We need to filter it by fields.&lt;/P&gt;&lt;P&gt;The current structure contains fields that have pipe separated values, example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AreaID AreaName&amp;nbsp;ClientsNames&lt;/P&gt;&lt;P&gt;5 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;GreenPoly &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;John Smith&lt;SPAN style="color: #000000;"&gt;&lt;A href="mailto:abs@gmail|abc@yahoo.com|abc@hotmail.com" style="color: #000000;"&gt;|Steve White|&lt;/A&gt;David Black&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Performance is slow &amp;nbsp;because we use "like"for this field "ClientsNames" in a layer definition to filter the layer.&lt;/P&gt;&lt;P&gt;example :&lt;/P&gt;&lt;P&gt;var layerDefinition;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;layerDefinition[0] = "ClientsNames like '%John Smith%' OR ClientsNames like '%&lt;A href="mailto:abs@gmail|abc@yahoo.com|abc@hotmail.com" style="color: #000000;"&gt;Steve White&lt;/A&gt;%'";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;setLayerDefinition(&lt;SPAN&gt;layerDefinition&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is possible improvement of performance:&lt;/P&gt;&lt;P&gt;1) restructure the data&lt;/P&gt;&lt;P&gt;2) use relationship class (if possible for file geodatabase on ArcGIS Server)&lt;/P&gt;&lt;P&gt;3) ??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2016 22:41:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/speed-up-complex-layer-definition-sql-on-arcgis/m-p/68630#M6005</guid>
      <dc:creator>PitersonPaulgek</dc:creator>
      <dc:date>2016-11-30T22:41:14Z</dc:date>
    </item>
  </channel>
</rss>

