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 :
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
  • Mustafa Omerbegović Profile Picture
    1,481 Moderator 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,481 Moderator 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 719 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 410 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 369 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans