<?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: Do FGDB database views have attribute indexes? (no indexes in underlying table) in Geodatabase Questions</title>
    <link>https://community.esri.com/t5/geodatabase-questions/do-fgdb-database-views-have-attribute-indexes/m-p/1374530#M8830</link>
    <description>&lt;P&gt;In the outer query, if I use a table alias instead of SELECT&amp;nbsp;&lt;STRONG&gt;*&lt;/STRONG&gt;, then the resulting view doesn't have indexes.&lt;/P&gt;&lt;PRE&gt;select
    &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;s.*&lt;/STRONG&gt;&lt;/FONT&gt;
from
    species_records &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;s&lt;/STRONG&gt;&lt;/FONT&gt;
inner join
    (select
        t_species,
        max(t_date) as t_date 
    from
        species_records 
    group by
        t_species) l
    on &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;s.&lt;/STRONG&gt;&lt;/FONT&gt;t_species = l.t_species 
       and &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;s.&lt;/STRONG&gt;&lt;/FONT&gt;t_date = l.t_date&lt;/PRE&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_1-1706206326853.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/92850iD1A2F8E6C9482C94/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bud_1-1706206326853.png" alt="Bud_1-1706206326853.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So that makes me wonder if this is a bug.&lt;/P&gt;&lt;P&gt;I've seen other strange behavior with SELECT * in FGDB database views too. And using a table alias has solved those issues.&lt;/P&gt;&lt;P&gt;See:&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P class=""&gt;BUG-000164420: Database View created in file geodatabase with Join definition does not create the required duplicate fields&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;Esri Case #03528630 - ArcGIS Pro 3.2.1: FGDB database view has joined fields with duplicate names; joined fields should not be excluded from attribute table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
    <pubDate>Thu, 25 Jan 2024 18:12:25 GMT</pubDate>
    <dc:creator>Bud</dc:creator>
    <dc:date>2024-01-25T18:12:25Z</dc:date>
    <item>
      <title>Do FGDB database views have attribute indexes?</title>
      <link>https://community.esri.com/t5/geodatabase-questions/do-fgdb-database-views-have-attribute-indexes/m-p/1374504#M8829</link>
      <description>&lt;P&gt;&lt;EM&gt;ArcGIS Pro 3.2.1; File Geodatabase&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I have a table that doesn't have any attribute indexes (other than the default ObjectID index):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_1-1706201968541.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/92816iE38757FE66CC18D0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bud_1-1706201968541.png" alt="Bud_1-1706201968541.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And I have a database view:&lt;/P&gt;&lt;PRE&gt;select
    *
from
    species_records
inner join
    (select
        t_species,
        max(t_date) as t_date 
    from
        species_records 
    group by
        t_species) l
    on species_records.t_species = l.t_species 
       and species_records.t_date = l.t_date&lt;/PRE&gt;&lt;P&gt;The view's properties and the attribute table headers both indicate that the view has indexed fields, even though the underlying table doesn't have indexes.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_4-1706203157074.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/92822i79F0C336D6C765B6/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bud_4-1706203157074.png" alt="Bud_4-1706203157074.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_2-1706203063664.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/92820i183FDF26AAD76110/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bud_2-1706203063664.png" alt="Bud_2-1706203063664.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Do FGDB database view fields really have attribute indexes?&lt;/P&gt;&lt;P&gt;I've heard of indexed views in SQL Server and materialized views in Oracle. But those mechanisms need to be set up manually. So I'm surprised to see FGDBs automatically index certain fields in a database view, especially when the underlying table isn't indexed.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2024 19:21:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/do-fgdb-database-views-have-attribute-indexes/m-p/1374504#M8829</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2024-01-26T19:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: Do FGDB database views have attribute indexes? (no indexes in underlying table)</title>
      <link>https://community.esri.com/t5/geodatabase-questions/do-fgdb-database-views-have-attribute-indexes/m-p/1374530#M8830</link>
      <description>&lt;P&gt;In the outer query, if I use a table alias instead of SELECT&amp;nbsp;&lt;STRONG&gt;*&lt;/STRONG&gt;, then the resulting view doesn't have indexes.&lt;/P&gt;&lt;PRE&gt;select
    &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;s.*&lt;/STRONG&gt;&lt;/FONT&gt;
from
    species_records &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;s&lt;/STRONG&gt;&lt;/FONT&gt;
inner join
    (select
        t_species,
        max(t_date) as t_date 
    from
        species_records 
    group by
        t_species) l
    on &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;s.&lt;/STRONG&gt;&lt;/FONT&gt;t_species = l.t_species 
       and &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;s.&lt;/STRONG&gt;&lt;/FONT&gt;t_date = l.t_date&lt;/PRE&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_1-1706206326853.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/92850iD1A2F8E6C9482C94/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bud_1-1706206326853.png" alt="Bud_1-1706206326853.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So that makes me wonder if this is a bug.&lt;/P&gt;&lt;P&gt;I've seen other strange behavior with SELECT * in FGDB database views too. And using a table alias has solved those issues.&lt;/P&gt;&lt;P&gt;See:&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P class=""&gt;BUG-000164420: Database View created in file geodatabase with Join definition does not create the required duplicate fields&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;Esri Case #03528630 - ArcGIS Pro 3.2.1: FGDB database view has joined fields with duplicate names; joined fields should not be excluded from attribute table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Thu, 25 Jan 2024 18:12:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/do-fgdb-database-views-have-attribute-indexes/m-p/1374530#M8830</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2024-01-25T18:12:25Z</dc:date>
    </item>
    <item>
      <title>Re: Do FGDB database views have attribute indexes?</title>
      <link>https://community.esri.com/t5/geodatabase-questions/do-fgdb-database-views-have-attribute-indexes/m-p/1375005#M8837</link>
      <description>&lt;P&gt;Esri Case #03528658 - FGDB database view — Attribute table shows unindexed fields as having indexes&lt;/P&gt;&lt;P&gt;BUG-000164631: Attribute indexes generated on fields participating in an inner join for the creation of a file geodatabase database view&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2024 19:05:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/do-fgdb-database-views-have-attribute-indexes/m-p/1375005#M8837</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2024-01-26T19:05:36Z</dc:date>
    </item>
  </channel>
</rss>

