<?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: Attribute table join (and sort) between two EGDB tables: How are the join and sort performed? (DB vs. application) in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/attribute-table-join-and-sort-between-two-egdb/m-p/1494953#M39822</link>
    <description>&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-pro-ideas/perform-join-at-the-database-level-not-the/idi-p/1293487" target="_self"&gt;Perform join at the database level, not the application level, when the datasets are in the same workspace&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Jun 2024 14:52:44 GMT</pubDate>
    <dc:creator>Bud</dc:creator>
    <dc:date>2024-06-19T14:52:44Z</dc:date>
    <item>
      <title>Attribute table join (and sort) between two EGDB tables: How are the join and sort performed? (DB vs. application)</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/attribute-table-join-and-sort-between-two-egdb/m-p/1186403#M33393</link>
      <description>&lt;P&gt;Oracle 18c 10.7.1 EGDB; ArcGIS Pro 2.6.8:&lt;/P&gt;&lt;P&gt;In the attribute table, if I join between one table to another, how is the join performed?&amp;nbsp;(DB vs. application)&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Does a single query get sent to the DB that returns ALL columns in a single resulset?&lt;UL&gt;&lt;LI&gt;Select the rows from the first table, do an SQL JOIN to the second table, for each row - retrieve the first row from the second table that's matched, return the whole thing as a single resultset?&lt;/LI&gt;&lt;LI&gt;Or maybe a subquery is used (for each row in the first table) to get a row from the second table?&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Or does the application do the joining?&lt;UL&gt;&lt;LI&gt;Select the rows from the first table. Select the rows from the second table. Use the application to match them up?&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Or something else?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Likewise, if I sort the columns in the attribute table, does the DB do the sorting, or does the application do the sorting?&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jun 2022 09:54:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/attribute-table-join-and-sort-between-two-egdb/m-p/1186403#M33393</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2022-06-27T09:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute table join (and sort) between two EGDB tables: How are the join and sort performed? (DB vs. application)</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/attribute-table-join-and-sort-between-two-egdb/m-p/1186404#M33394</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;The reason I ask:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;I'm trying to figure out why sorting is so slow in this workaround:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;Question:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-pro-ideas/sorting-a-field-in-the-attribute-table-specify-how/idc-p/1185335" target="_self"&gt;Sorting a field in the attribute table: Specify how nulls are handled (nulls first or last)&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Workaround:&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Create a query layer with a NULL_FLAG field:&lt;/P&gt;&lt;PRE&gt;&lt;FONT color="#999999"&gt;select&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#999999"&gt;    objectid,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#999999"&gt;    last_edited_date,&lt;/FONT&gt;&lt;BR /&gt;    case &lt;BR /&gt;        when last_edited_date is not null then 1 &lt;BR /&gt;        else 0 &lt;BR /&gt;    end as null_flag&lt;BR /&gt;&lt;FONT color="#999999"&gt;    --Source: https://modern-sql.com/concept/null#order-by&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#999999"&gt;from&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#999999"&gt;    events&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;2. In the Attribute Table, join from the table to the query layer via the OBJECTID.&lt;/P&gt;&lt;P&gt;3. Do an advanced sort using the fields from the query layer:&lt;BR /&gt;&amp;nbsp;- NULL_FLAG descending.&lt;BR /&gt;&amp;nbsp;- LAST_EDITED_DATE descending.&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, the &lt;U&gt;latest dates are at the top&lt;/U&gt; and the &lt;U&gt;nulls are at the bottom&lt;/U&gt;. Which is what I want.&lt;/P&gt;&lt;P&gt;Unfortunately, it's far too slow to use. It takes roughly a minute to do the sorting, whereas sorting was instantaneous without the workaround (and sorting was instantaneous when I tested the query in SQL Developer too). So, something about sorting on the query layer in the attribute table is going awry.&lt;/P&gt;</description>
      <pubDate>Sun, 26 Jun 2022 01:02:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/attribute-table-join-and-sort-between-two-egdb/m-p/1186404#M33394</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2022-06-26T01:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute table join (and sort) between two EGDB tables: How are the join and sort performed? (DB vs. application)</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/attribute-table-join-and-sort-between-two-egdb/m-p/1494953#M39822</link>
      <description>&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-pro-ideas/perform-join-at-the-database-level-not-the/idi-p/1293487" target="_self"&gt;Perform join at the database level, not the application level, when the datasets are in the same workspace&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2024 14:52:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/attribute-table-join-and-sort-between-two-egdb/m-p/1494953#M39822</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2024-06-19T14:52:44Z</dc:date>
    </item>
  </channel>
</rss>

