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 :
Small and medium business | Business Central, N...
Answered

Filtering G/L Account Table Efficiently

(1) ShareShare
ReportReport
Posted on by 112
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
I have the same question (0)
  • Mustafa Omerbegović Profile Picture
    1,473 Super User 2025 Season 2 on at
    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.
  • VK-16090859-0 Profile Picture
    14 on at
    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.
  • Unanonyms.5974 Profile Picture
    112 on at
    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...
  • Verified answer
    Mustafa Omerbegović Profile Picture
    1,473 Super User 2025 Season 2 on at
    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

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,092

#2
YUN ZHU Profile Picture

YUN ZHU 663 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 515

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans