web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Perfomance

(2) ShareShare
ReportReport
Posted on by 6
What is better for performance and why??

These two while loops
   while select table1       where table1.AId == _aId             && table1.OC  == OC::B             && table1.ORC  == _bId   {       LanguageTxt::createOrUpdate(table1.TableId, table1.RecId, _description, _languageId);   }  while select table1                where table1.AId  == _aId                    && table1.OC         == OC::DR                exists join table2                    where table2.OId == table1.OId                exists join table3                    where table3.DId   == table2.DId                        && table3.BId        == _bId{   LanguageTxt::createOrUpdate(table1.TableId, table1.RecId, _description, _languageId);}
 

OR (combining them)
 
            while select table1                where table1.AId      == _aId                            outer join RecId                     from table2                        where table2.OId == table1.OId                outer join RecId                     from table3                        where table3.DId   == table2.DId                        && (                             (                              table1.OC == OC::DR &&                              table3.BId  == _bId                             )                             ||                             (                              table1.OC == OC::B &&                              table1.ORC    == _bId                             )                           ){     LanguageTxt::createOrUpdate(table1.TableId, table1.RecId, _description, _languageId);}
 
I have the same question (0)
  • CU04051814-0 Profile Picture
    6 on at
    I will post the code again

    These two while loops
      while select table1 
        where table1.AId == _aId 
              && table1.OC == OC::B 
              && table1.OR == _bId 
    {
        LanguageTxt::createOrUpdate(table1.TableId, table1.RecId, _description, _languageId);
    }
      
    while select table1
      where table1.AId == _aId
          && table1.OC == OC::DR 
      exists join table2 
            where table2.OId == table1.OId
      exists join table3 
            where table3.DId == table2.DId
               && table3.BId == _bId 
     {
        LanguageTxt::createOrUpdate(table1.TableId, table1.RecId, _description, _languageId);
     }

    OR combining them
     while select table1
                    where table1.AId      == _aId            
                    outer join RecId 
                        from table2
                            where table2.OId == table1.OId
                    outer join RecId 
                        from table3
                            where table3.DId   == table2.DId
                            && (
                                 (
                                  tabl2.ORC == ORC::DR &&
                                  table3.BId          == _bId
                                 )
                                 ||
                                 (
                                  table1.ORC == ORC::B &&
                                  table1.OR     == _bId
                                 )
                               )
    {
        LanguageTxt::createOrUpdate(table1.TableId, table1.RecId, _description, _languageId);
    }
     
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,390 Super User 2025 Season 2 on at

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 683 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 563 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 398 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans