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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

Perfomance

(2) ShareShare
ReportReport
Posted on by 172
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)
  • CU22120935-0 Profile Picture
    172 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,801 Super User 2026 Season 1 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 617

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 461 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 298 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans