<?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: How does ArcGIS Sort tool handle records that match for all specified fields? in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/how-does-arcgis-sort-tool-handle-records-that/m-p/226195#M12808</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Esri's documentation doesn't address the question, likely because the behavior could vary by back-end datasource or DBMS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Most, if not all, DBMSs only guarantee the result set order stated by an ORDER BY clause.&amp;nbsp; Any ordering outside of an ORDER BY clause may change between executions.&amp;nbsp; It doesn't mean the ordering between executions will change, just that it may change if the fields/columns aren't part of an ORDER BY clause.&amp;nbsp; The underlying reason is that a query optimizer is free to choose a different execution plan every time it executes a query, and fields/columns that aren't part of an ORDER BY clause may be processed or retrieved in a different order with different execution plans.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Jul 2020 19:35:47 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2020-07-22T19:35:47Z</dc:date>
    <item>
      <title>How does ArcGIS Sort tool handle records that match for all specified fields?</title>
      <link>https://community.esri.com/t5/data-management-questions/how-does-arcgis-sort-tool-handle-records-that/m-p/226194#M12807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using ArcGIS Desktop 10.7.&amp;nbsp; Concerning the &lt;STRONG&gt;Sort&lt;/STRONG&gt; (data management) tool (described &lt;A href="https://desktop.arcgis.com/en/arcmap/10.7/tools/data-management-toolbox/sort.htm"&gt;here&lt;/A&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; Say I specify 3 sort fields, and there are records that have matching values for all 3. How does the tool decide which of those records are sorted first? Does it go by OBJECTID value, or another field? Is it random?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2020 17:54:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-does-arcgis-sort-tool-handle-records-that/m-p/226194#M12807</guid>
      <dc:creator>MatthewLeonard</dc:creator>
      <dc:date>2020-07-22T17:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: How does ArcGIS Sort tool handle records that match for all specified fields?</title>
      <link>https://community.esri.com/t5/data-management-questions/how-does-arcgis-sort-tool-handle-records-that/m-p/226195#M12808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Esri's documentation doesn't address the question, likely because the behavior could vary by back-end datasource or DBMS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Most, if not all, DBMSs only guarantee the result set order stated by an ORDER BY clause.&amp;nbsp; Any ordering outside of an ORDER BY clause may change between executions.&amp;nbsp; It doesn't mean the ordering between executions will change, just that it may change if the fields/columns aren't part of an ORDER BY clause.&amp;nbsp; The underlying reason is that a query optimizer is free to choose a different execution plan every time it executes a query, and fields/columns that aren't part of an ORDER BY clause may be processed or retrieved in a different order with different execution plans.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2020 19:35:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-does-arcgis-sort-tool-handle-records-that/m-p/226195#M12808</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2020-07-22T19:35:47Z</dc:date>
    </item>
  </channel>
</rss>

