Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Answered

Filtering G/L Account Table Efficiently

(1) ShareShare
ReportReport
Posted on by 31
Hi Experts, 
 
Recently I was asked a question , which was 'To filter a G\L account table efficiently' means performance of filter should be very efficient.
 
I know about setCurrentKey , also applied that, but result was not fast.
 
I found that the field which was used as filter parameter, that was not there in G\L account table ,may be this can make setcurrentkey slow. 
 
 
Could someone help me to suggest the best efficient way to filter out large dataset tables in Business Central ? 
 
Thanks, 
Ankit
  • Verified answer
    Filtering G/L Account Table Efficiently
    Hello,
     
    you can find almost all the information on Microsoft Learn and below are the links where you can read more about filtering.
     
     
    Also, you can find a lot of different material on the next blogs.
    Search for main words and you will find something useful for sure.
     
     
    If you have specific questions about a problem, I am at your disposal.
     
    Greetings
  • Unanonyms.5974 Profile Picture
    Unanonyms.5974 31 on at
    Filtering G/L Account Table Efficiently
    Thanks , @Mustafa and @VK for you response .
     
    @Mustafa , Could you suggest some resource to know better , how to make indexes for filtered fields . 
     
    @VK, just want to know about efficiently filtering on large datasets tables.
     
    Thanks both of you...
  • VK-16090859-0 Profile Picture
    VK-16090859-0 14 on at
    Filtering G/L Account Table Efficiently
    Ankit, though GL Account Table is short, seems you are facing challenge into GL Entry associated as one of the  flowfield of COA. Can you explain what actually are you trying to advise you.
  • Filtering G/L Account Table Efficiently
    Hello,
     
    it depends on the data you are filtering, but there are some best practices:
     
    • Index the filtered fields to speed up process.
    • Use SETRANGE for simple filtering as it is more efficient than SETFILTER, but SETFILTER can handle more complex conditions.
    • Apply filters in the begging and filter on indexed fields first.
    • Also you can use temporary tables or SQL queries if necessary, for very large datasets and this is the fastest way to get data I think.
    It is also necessary to consider the basic principles of SQL filtering that integer fields will be filtered the fastest, even better if they are indexed.
     
    I hope someone else will give some ideas.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey Pt 2

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,904 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,605 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans