<?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 Open table with sorted join — Logs show redundant queries sent to DB in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/open-table-with-sorted-join-logs-show-redundant/m-p/1282555#M68377</link>
    <description>&lt;P&gt;&lt;EM&gt;ArcGIS Pro 3.1.1; mobile geodatabase&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I have a standalone table called TEST_TABLE (14,538 rows) that is joined to a database view:&lt;/P&gt;&lt;PRE&gt;--test_table_nt_flag_vw&lt;BR /&gt;select &lt;BR /&gt;    objectid,&lt;BR /&gt;    case when type = 'NT' then 1 else 0 end as flag&lt;BR /&gt;from &lt;BR /&gt;    test_table&lt;/PRE&gt;&lt;P&gt;I've sorted on the view's FLAG field in the attribute table.&lt;/P&gt;&lt;P&gt;Use case:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://community.esri.com/t5/arcgis-pro-ideas/promote-selected-records/idc-p/1276742/highlight/true#M24339" target="_blank" rel="noopener"&gt;Promote selected records&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://community.esri.com/t5/arcgis-pro-ideas/specify-how-nulls-are-sorted-in-the-attribute/idc-p/1185335/highlight/true#M19998" target="_blank" rel="noopener"&gt;Specify how nulls are sorted in the attribute table (nulls first or last)&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://community.esri.com/t5/arcgis-pro-ideas/virtual-attributes-ad-hoc/idi-p/1276471" target="_blank" rel="noopener"&gt;Virtual Attributes (ad hoc)&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;BR /&gt;When opening the joined/sorted attribute table, I noticed that the Diagnostic Monitor logs show that redundant queries were sent to the database.&lt;/P&gt;&lt;P&gt;Video:&lt;/P&gt;&lt;P&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6326204269112w1044h540r8" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6326204269112" data-account="6161463677001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6161463677001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6326204269112w1044h540r8');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://community.esri.com/t5/video/gallerypage/video-id/6326204269112"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I've taken the logs from Diagnostic Monitor and pivoted/filtered them in the attached Excel spreadsheet (in the &lt;U&gt;Pivoted and Filtered&lt;/U&gt;&amp;nbsp;worksheet). That makes it easier to compare the queries against each other to see which ones are redundant. &lt;A href="https://community.esri.com/t5/arcgis-pro-ideas/copy-diagnostic-monitor-logs-as-excel-table-not-as/idc-p/1279070/highlight/true#M24484" target="_blank" rel="noopener"&gt;Source&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Observations about the queries in the spreadsheet (each row in the spreadsheet summarizes a query from the logs):&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Rows 23 and 24 are exact copies. Why do we need both? Further, the OBJECTIDs in those queries are already included in row 3 and 4. So rows 23 and 24 seem unnecessary.&lt;/LI&gt;&lt;LI&gt;Row 2 is also redundant. Rows 3-22 already do everything that row 2 does. (While only a portion of the records are queried in rows 2-33, that's just because I haven't navigated to the bottom of the attribute table yet. Once I do that, all records will be accounted for in those queries.)&lt;/LI&gt;&lt;LI&gt;To me, only rows 3-22 seem necessary.&lt;UL class="lia-list-style-type-circle"&gt;&lt;LI&gt;Those rows seem to take some sort of pagination approach.&lt;/LI&gt;&lt;LI&gt;In comparison, when a table (no join or sort) is opened in ArcGIS Pro, the queries are paginated in that case too (and they're the only queries shown in the logs -- &lt;STRIKE&gt;no redundant queries&lt;/STRIKE&gt;). So that makes me think paginated queries are standard in ArcGIS Pro.&lt;/LI&gt;&lt;LI&gt;Therefore, I suspect the paginated queries in rows 3-22 are appropriate and should be kept. Rows 2, 23, and 24 seem unnecessary and could be eliminated.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Question:&lt;/P&gt;&lt;P&gt;Why does opening a table with a sorted join produce redundant queries?&lt;/P&gt;&lt;P&gt;I'm investigating this simple mobile geodatabase example in hopes that I can solve performance issues when doing the same thing, but with larger Oracle tables, as a way of coming up with a workaround for&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-pro-ideas/virtual-attributes-ad-hoc/idi-p/1276471" target="_blank" rel="noopener"&gt;Virtual Attributes (ad hoc)&lt;/A&gt;&amp;nbsp;that &lt;U&gt;performs well&lt;/U&gt;.&lt;/P&gt;</description>
    <pubDate>Wed, 26 Apr 2023 14:01:22 GMT</pubDate>
    <dc:creator>Bud</dc:creator>
    <dc:date>2023-04-26T14:01:22Z</dc:date>
    <item>
      <title>Open table with sorted join — Logs show redundant queries sent to DB</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/open-table-with-sorted-join-logs-show-redundant/m-p/1282555#M68377</link>
      <description>&lt;P&gt;&lt;EM&gt;ArcGIS Pro 3.1.1; mobile geodatabase&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I have a standalone table called TEST_TABLE (14,538 rows) that is joined to a database view:&lt;/P&gt;&lt;PRE&gt;--test_table_nt_flag_vw&lt;BR /&gt;select &lt;BR /&gt;    objectid,&lt;BR /&gt;    case when type = 'NT' then 1 else 0 end as flag&lt;BR /&gt;from &lt;BR /&gt;    test_table&lt;/PRE&gt;&lt;P&gt;I've sorted on the view's FLAG field in the attribute table.&lt;/P&gt;&lt;P&gt;Use case:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://community.esri.com/t5/arcgis-pro-ideas/promote-selected-records/idc-p/1276742/highlight/true#M24339" target="_blank" rel="noopener"&gt;Promote selected records&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://community.esri.com/t5/arcgis-pro-ideas/specify-how-nulls-are-sorted-in-the-attribute/idc-p/1185335/highlight/true#M19998" target="_blank" rel="noopener"&gt;Specify how nulls are sorted in the attribute table (nulls first or last)&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://community.esri.com/t5/arcgis-pro-ideas/virtual-attributes-ad-hoc/idi-p/1276471" target="_blank" rel="noopener"&gt;Virtual Attributes (ad hoc)&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;BR /&gt;When opening the joined/sorted attribute table, I noticed that the Diagnostic Monitor logs show that redundant queries were sent to the database.&lt;/P&gt;&lt;P&gt;Video:&lt;/P&gt;&lt;P&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6326204269112w1044h540r687" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6326204269112" data-account="6161463677001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6161463677001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6326204269112w1044h540r687');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://community.esri.com/t5/video/gallerypage/video-id/6326204269112"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I've taken the logs from Diagnostic Monitor and pivoted/filtered them in the attached Excel spreadsheet (in the &lt;U&gt;Pivoted and Filtered&lt;/U&gt;&amp;nbsp;worksheet). That makes it easier to compare the queries against each other to see which ones are redundant. &lt;A href="https://community.esri.com/t5/arcgis-pro-ideas/copy-diagnostic-monitor-logs-as-excel-table-not-as/idc-p/1279070/highlight/true#M24484" target="_blank" rel="noopener"&gt;Source&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Observations about the queries in the spreadsheet (each row in the spreadsheet summarizes a query from the logs):&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Rows 23 and 24 are exact copies. Why do we need both? Further, the OBJECTIDs in those queries are already included in row 3 and 4. So rows 23 and 24 seem unnecessary.&lt;/LI&gt;&lt;LI&gt;Row 2 is also redundant. Rows 3-22 already do everything that row 2 does. (While only a portion of the records are queried in rows 2-33, that's just because I haven't navigated to the bottom of the attribute table yet. Once I do that, all records will be accounted for in those queries.)&lt;/LI&gt;&lt;LI&gt;To me, only rows 3-22 seem necessary.&lt;UL class="lia-list-style-type-circle"&gt;&lt;LI&gt;Those rows seem to take some sort of pagination approach.&lt;/LI&gt;&lt;LI&gt;In comparison, when a table (no join or sort) is opened in ArcGIS Pro, the queries are paginated in that case too (and they're the only queries shown in the logs -- &lt;STRIKE&gt;no redundant queries&lt;/STRIKE&gt;). So that makes me think paginated queries are standard in ArcGIS Pro.&lt;/LI&gt;&lt;LI&gt;Therefore, I suspect the paginated queries in rows 3-22 are appropriate and should be kept. Rows 2, 23, and 24 seem unnecessary and could be eliminated.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Question:&lt;/P&gt;&lt;P&gt;Why does opening a table with a sorted join produce redundant queries?&lt;/P&gt;&lt;P&gt;I'm investigating this simple mobile geodatabase example in hopes that I can solve performance issues when doing the same thing, but with larger Oracle tables, as a way of coming up with a workaround for&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-pro-ideas/virtual-attributes-ad-hoc/idi-p/1276471" target="_blank" rel="noopener"&gt;Virtual Attributes (ad hoc)&lt;/A&gt;&amp;nbsp;that &lt;U&gt;performs well&lt;/U&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 14:01:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/open-table-with-sorted-join-logs-show-redundant/m-p/1282555#M68377</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2023-04-26T14:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: Open table with sorted join — Logs show redundant queries sent to DB</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/open-table-with-sorted-join-logs-show-redundant/m-p/1282690#M68396</link>
      <description>&lt;P&gt;Here's the SQLite query I used to pivot and filter the logs:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-pro-ideas/copy-diagnostic-monitor-logs-as-excel-table-not-as/idc-p/1281604/highlight/true#M24641" target="_self"&gt;Copy Diagnostic Monitor logs as Excel table, not as vertical tags&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 07:32:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/open-table-with-sorted-join-logs-show-redundant/m-p/1282690#M68396</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2023-04-26T07:32:00Z</dc:date>
    </item>
  </channel>
</rss>

