<?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: Arcade Performance: FeatureSetByRelationshipName vs. FeatureSetByName in Attribute Rules Questions</title>
    <link>https://community.esri.com/t5/attribute-rules-questions/arcade-performance-featuresetbyrelationshipname-vs/m-p/1694146#M1934</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/607631"&gt;@FabianHannich&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;As per my experience, option 1 is cleaner. It’s "Geodatabase-aware," and it’s significantly easier for the next person to read when your code breaks six months from now.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;If you’re doing this in a loop or on a batch of 10,000 records, any FeatureSet call will hurt. But for a standard Attribute Rule? Option 1 is the professional's choice.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 02 Apr 2026 14:16:49 GMT</pubDate>
    <dc:creator>VenkataKondepati</dc:creator>
    <dc:date>2026-04-02T14:16:49Z</dc:date>
    <item>
      <title>Arcade Performance: FeatureSetByRelationshipName vs. FeatureSetByName</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/arcade-performance-featuresetbyrelationshipname-vs/m-p/1694136#M1933</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am currently working with Arcade expressions in attribute rules and have come across a performance-related question for which I haven’t yet found a clear comparison in the community.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;Initial situation:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;I am working with the following feature classes and tables:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT size="3"&gt;&lt;STRONG&gt;Address&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;Fields: aId (PK), from_number, sId (FK)&lt;/LI&gt;&lt;LI&gt;&lt;FONT size="3"&gt;&lt;STRONG&gt;Street&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;Fields: sId (PK), name&lt;/LI&gt;&lt;LI&gt;&lt;FONT size="3"&gt;&lt;STRONG&gt;Status&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;Fields: aIdORsId (FK), status, type&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;Relationships:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Address – Status (1:1)&lt;/LI&gt;&lt;LI&gt;Street – Address (1:n)&lt;/LI&gt;&lt;LI&gt;Street – Status (1:1)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I would like to create an attribute rule on the &lt;FONT size="3"&gt;&lt;STRONG&gt;Status&lt;/STRONG&gt;&lt;/FONT&gt; table:&lt;/P&gt;&lt;P&gt;If:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;type = "Address" and&lt;/LI&gt;&lt;LI&gt;status = "Error"&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;then the status of the related&lt;FONT size="3"&gt; &lt;STRONG&gt;Street&lt;/STRONG&gt; s&lt;/FONT&gt;hould also be set to "Error".&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;Implementation approaches:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Option 1: Using FeatureSetByRelationshipName&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;var addr = First(FeatureSetByRelationshipName($feature, "Address-Status"))&lt;BR /&gt;var str = First(FeatureSetByRelationshipName(addr, "Street-Address"))&lt;BR /&gt;var stat = First(FeatureSetByRelationshipName(str, "Street-Status"))&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;STRONG&gt;Option 2: Using FeatureSetByName&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;var addr = First(FeatureSetByRelationshipName($feature, "Address-Status"))&lt;BR /&gt;var statFs = FeatureSetByName($datastore, "Status")&lt;BR /&gt;var stat = First(Filter(statFs, 'aIdORsId = @addr.sId'))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;Question:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Which approach is more performant?&lt;/P&gt;&lt;P&gt;I am particularly interested in:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Should FeatureSetByRelationshipName generally be preferred when relationships are available?&lt;/LI&gt;&lt;LI&gt;How much does the number of FeatureSet calls impact performance?&lt;/LI&gt;&lt;LI&gt;Is a combination of FeatureSetByRelationshipName and FeatureSetByName problematic in terms of additional requests?&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Thu, 02 Apr 2026 13:51:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/arcade-performance-featuresetbyrelationshipname-vs/m-p/1694136#M1933</guid>
      <dc:creator>FabianHannich</dc:creator>
      <dc:date>2026-04-02T13:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Performance: FeatureSetByRelationshipName vs. FeatureSetByName</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/arcade-performance-featuresetbyrelationshipname-vs/m-p/1694146#M1934</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/607631"&gt;@FabianHannich&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;As per my experience, option 1 is cleaner. It’s "Geodatabase-aware," and it’s significantly easier for the next person to read when your code breaks six months from now.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;If you’re doing this in a loop or on a batch of 10,000 records, any FeatureSet call will hurt. But for a standard Attribute Rule? Option 1 is the professional's choice.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2026 14:16:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/arcade-performance-featuresetbyrelationshipname-vs/m-p/1694146#M1934</guid>
      <dc:creator>VenkataKondepati</dc:creator>
      <dc:date>2026-04-02T14:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Performance: FeatureSetByRelationshipName vs. FeatureSetByName</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/arcade-performance-featuresetbyrelationshipname-vs/m-p/1694193#M1935</link>
      <description>&lt;P&gt;If you aren't tallying up CPU instructions, the answer to "which option is more performant" is always "the one that ran the fastest in testing." Build up a representative dataset, move it to a testing clone of your usual RDBMS setup, load that into a copy of Pro on a free machine and then run some tests. For each attribute rule you'll want to run a bulk update, measure the time it took, reset the state of the test data&amp;nbsp;&lt;EM&gt;outside&lt;/EM&gt; of this time measurement, then run that entire test multiple times so you can average out external performance concerns. Then you just use whatever wins! Like&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/923685"&gt;@VenkataKondepati&lt;/a&gt;&amp;nbsp;mentioned, option 2 is tougher to maintain in the future, so if that wins I recommend leaving a big fat comment in the attribute rule that explains what's going on and also includes option 1 for reference.&lt;BR /&gt;&lt;BR /&gt;Some resources for building your test runs:&lt;BR /&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/data-access/updatecursor-class.htm" target="_self"&gt;Update Cursor&lt;/A&gt; (to change an attribute and trigger the rule)&lt;BR /&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/data-access/editor.htm" target="_self"&gt;Editor&lt;/A&gt; (to ensure the updates are processed in the same edit session)&lt;BR /&gt;&lt;A href="https://docs.python.org/3.13/library/time.html#time.perf_counter" target="_self"&gt;time.perf_counter&lt;/A&gt; (call this before and after the edit session, then do &lt;FONT face="courier new,courier"&gt;after - before&lt;/FONT&gt; to get a value of elapsed time. Always use counters like this instead of standard datetime functions to measure performance as they're more accurate and are unaffected by world clock synchronization)&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2026 16:06:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/arcade-performance-featuresetbyrelationshipname-vs/m-p/1694193#M1935</guid>
      <dc:creator>DavidSolari</dc:creator>
      <dc:date>2026-04-02T16:06:30Z</dc:date>
    </item>
  </channel>
</rss>

