<?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 How long can a definition query be? in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/how-long-can-a-definition-query-be/m-p/263086#M10116</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm just wondering if there is any limit on the length of a definition query statement - by number of characters, maybe, or otherwise?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using ArcGIS Desktop 10.3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just wrote a definition query statement like this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OBJECTID&amp;nbsp;IN ('VALUE1', 'VALUE2', 'VALUE3', etc...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...but with many more values in the list.&amp;nbsp; In my example I had 300&amp;nbsp;values in the list.&amp;nbsp; So, for future reference, at what point would the list be too long for ArcMap to handle?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Jan 2020 19:24:58 GMT</pubDate>
    <dc:creator>MatthewLeonard</dc:creator>
    <dc:date>2020-01-03T19:24:58Z</dc:date>
    <item>
      <title>How long can a definition query be?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/how-long-can-a-definition-query-be/m-p/263086#M10116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm just wondering if there is any limit on the length of a definition query statement - by number of characters, maybe, or otherwise?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using ArcGIS Desktop 10.3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just wrote a definition query statement like this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OBJECTID&amp;nbsp;IN ('VALUE1', 'VALUE2', 'VALUE3', etc...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...but with many more values in the list.&amp;nbsp; In my example I had 300&amp;nbsp;values in the list.&amp;nbsp; So, for future reference, at what point would the list be too long for ArcMap to handle?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jan 2020 19:24:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/how-long-can-a-definition-query-be/m-p/263086#M10116</guid>
      <dc:creator>MatthewLeonard</dc:creator>
      <dc:date>2020-01-03T19:24:58Z</dc:date>
    </item>
    <item>
      <title>Re: How long can a definition query be?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/how-long-can-a-definition-query-be/m-p/263087#M10117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When working with definition queries, ArcGIS clients simply pass the conditions through to the data store tier, e.g., file geodatabase, SQL Server, Oracle, Postgres, etc....&amp;nbsp; As far as I know, Esri does not place a limit, per se, on the string containing a definition query.&amp;nbsp; So, the answer really depends on what back-end data store you are working with in ArcGIS.&amp;nbsp; Oracle is commonly believed to limit IN clauses to 1,000 items, and Microsoft uses the open-ended language "many thousands of values."&amp;nbsp; I don't think Esri has formally stated the limit for file geodatabases, but it is quite large, thousands if not tens of thousands.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Beyond some limit that you may or may not hit in the future, large IN clauses are not very efficient in terms of execution plans.&amp;nbsp; If you are working with thousands of values in an IN clause, there is likely a much better performing approach to selecting/filtering the records.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jan 2020 23:35:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/how-long-can-a-definition-query-be/m-p/263087#M10117</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2020-01-03T23:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: How long can a definition query be?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/how-long-can-a-definition-query-be/m-p/1042262#M29858</link>
      <description>&lt;P&gt;Here are some other resources about this topic:&lt;/P&gt;&lt;P&gt;&lt;A href="https://gis.stackexchange.com/questions/141099/definition-query-expression-limits-in-arcgis-10-2-2" target="_blank"&gt;https://gis.stackexchange.com/questions/141099/definition-query-expression-limits-in-arcgis-10-2-2&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.oracle.com/tech/developers/discussion/235143/ora-01795-limit-on-in-clause" target="_blank"&gt;https://community.oracle.com/tech/developers/discussion/235143/ora-01795-limit-on-in-clause&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:778625947169" target="_blank"&gt;https://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:778625947169&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/400255/how-to-put-more-than-1000-values-into-an-oracle-in-clause" target="_blank"&gt;https://stackoverflow.com/questions/400255/how-to-put-more-than-1000-values-into-an-oracle-in-clause&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 02:14:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/how-long-can-a-definition-query-be/m-p/1042262#M29858</guid>
      <dc:creator>AndresCastillo</dc:creator>
      <dc:date>2021-03-31T02:14:00Z</dc:date>
    </item>
  </channel>
</rss>

