Performance
Performance best practices for Business Central development: how to troubleshoot a performance problem by measuring and locating bottlenecks, and how AL developers can tune pages, web services, AL code, and data access. It answers questions about diagnostic tools and tuning techniques.
- 2Learn pages
- 5videos
Path: Development > Rules, guidelines, and best practices > Best practices > Performance · tier official · system platform · narrative unreviewed (model text not yet checked)
Overview
This section covers performance work for Business Central in two pages. One is a troubleshooting guide. The other is a tuning guide for AL developers.
“How to work with a performance problem” describes a process of measuring, locating bottlenecks, and eliminating them. It lists the tools to use at each step: the scheduled performance profiler, the in-client Performance Profiler, the AL Profiler, telemetry with Azure Application Insights, and database analysis through Missing Indexes and Wait Statistics.
“Performance Articles for AL Developers” is for building efficient solutions. It covers page and web service design, AL patterns, data access optimization, and testing strategies. Start with the troubleshooting page when you have a slow scenario to diagnose. Use the AL developer page when you design or review code and want to avoid performance problems.
Key points
- Troubleshooting follows three steps: measure, locate the bottleneck, and eliminate it.
- Diagnostic tools include the scheduled performance profiler, the in-client Performance Profiler, and the AL Profiler.
- Telemetry with Azure Application Insights helps find performance problems.
- Database analysis uses Missing Indexes and Wait Statistics.
- AL developer guidance covers page background tasks, partial records, and set-based methods.
- Data access topics include columnstore indexes, SIFT indexes, and Read Scale-Out.
- The AL developer articles reference 2019 release wave 1, 2021 release wave 2, 2023 release wave 1, and 2023 release wave 2.
- Guidance also covers efficient page and web service design and testing strategies.
Learn pages
- How to work with a performance problem: Troubleshooting process that can help to guide you to find the root cause slow performance.
- Performance Articles for AL Developers: Learn how to write efficient AL code, pages, reports, and web services, and use tools like the AL Profiler to improve performance in Business Central.
- In the observatory: Page 2610 “Feature Management”, Page 9511 “Database Locks”
Videos, posts and code changes
Linked by a Haiku matcher with a grounding quote from the item’s summary (link/topics.ts); machine-generated.
- #12186 Set several fields in one ModifyAll call (code change): “Consecutive ModifyAll calls on the same filtered record are merged into a single call”
- #13953 Add key on Email Message Attachment Data to speed up email deletion (backport to releases/29.x) (code change): “improve performance when deleting emails, avoiding full table scans”
- #14002 External File Storage: reject “.” and “..” path segments (code change): “rejects any path where a whole segment is . or .., for all operations and connectors”
- #134 knowledge(performance): add community rules for performance (code change): “16 community performance rules for Business Central to BCQuality”
- #135 Correct severe misconception about SetCurrentKey in the knowledge base (code change): “SetCurrentKey generates ORDER BY clauses, not SQL index hints”
- #148 Add Job Queue reliability and scheduling guidance (code change): “reliability and scheduling practices for Job Queue and Task Scheduler workloads”
- #161 AL methods limited during write transactions (RunModal, Codeunit.Run) (code change): “New performance guidance documents platform restrictions on calling RunModal”
- #198 Add BC performance knowledge from OptimAL learnings (code change): “Six new articles on workload-based keys, overlapping indexes, buffered inserts”
- #205 Preserve business filters when recommending Record.Get (code change): “Preserve business filters when recommending Record.Get. The performance guidance for replacing”
- #215 knowledge(performance): grouped query (Count + ColumnFilter = HAVING) for distinct values and duplicates (code change): “use query objects with grouped methods and column filters to detect duplicate values”
- #225 Performance and style knowledge: compute Role Center headlines in the background; build client links with GetUrl (code change): “compute Role Center headlines in the background”
- #253 knowledge(performance): add trigger-only fields to API pages with AddLoadFields (code change): “prevent JIT loading failures when accessing unbound fields in OnAfterGetRecord”
- #275 knowledge(performance): Get behind a key-is-set check in and-condition wastes a DB call (code change): “Get behind a key-is-set check in and-condition wastes a DB call”
- #94 Correct performance knowledge guidance (code change): “Several performance knowledge articles and their samples were corrected for partial records, transactions”
- #97 Add per-row AL performance guidance (code change): “New performance guidance documents how to use SetAutoCalcFields for per-row FlowFields”
- Optimizing Business Central Indexes for Performance with Copilot (community post): “Balance query performance gains against write performance costs”
- Dynamics 365 Business Central: finally we’ll have TRUNCATE table in SaaS. (community post): “efficient bulk deletion of table rows in SaaS environments”
- Dynamics 365 Business Central: use sequential GUIDs when possible. (community post): “Performance benchmarks showed 42% improvement on inserts and 31% on updates”
- Dynamics 365 Business Central: AL transaction isolation levels and cache usage. (community post): “Record.ReadIsolation sets the isolation level for reads on a specific record instance”
- Dynamics 365 Business Central: AL Query objects and the new ReadState property. (community post): “ReadState property lets developers specify transaction isolation levels for individual queries”
- Guid.CreateSequentialGuid in AL (community post): “reducing index fragmentation and improving performance for GUID-based keys”
- Rec.Truncate in AL (community post): “Truncating a whole table without filters is far faster than DeleteAll”
- Partial Record vs NST Caching : the strange case of Calculate Low Level Code (community post): “performance regressions when combined with NST caching in Business Central”
- BC 29 lets a single index span base table and table extension fields (community post): “Developers must still consider the 40-key-per-table limit and write performance costs when adding new indexes”
- If You Can’t Make It Fast, Make It Feel Fast (community post): “making users wait for work that needs no input from them is a design choice”
- I Can Turn Off My Code. I Can’t Turn Off Yours. (community post): “developers set RunTrigger to false on Insert, Modify, or DeleteAll, they silently disable all subscribers”
- Planning Table Indexes for the Best Performance (community post): “Every added index increases insert or update time by 10-20%”
- BC Friday Tips #30 DataAccessIntent (community post): “DataAccessIntent property signals the server to use a replica database”
- Dynamics 365 Business Central: How to calculate the total (sum) of a column in a table (Four ways) (community post): “each approach has different use cases and performance characteristics”
- Business Central 2025 wave 2 (BC27): Truncating table data with new AL method (procedure Truncate) (community post): “deletes all records in the current filter range far faster”
- Business Central 2025 wave 2 (BC27): Add LockTimeoutDuration allow increasing/lowering lock timeout instead of only disabling/enabling it (New Database.LockTimeoutDuration Method) (community post): “developers can raise or lower the timeout instead of only switching it on”
- Business Central 2025 wave 2 (BC27): Create a new sequential unique GUID (Guid.CreateSequentialGuid Method) (community post): “Sequential GUIDs perform better when used as table keys due to partial sequencing”
- Business Central 2026 release wave 2 (BC29): Administrators can turn SIFT (SumIndexField Technology) indexes on/off (community post): “SIFT indexes optimize performance of FlowFields”
- Concurrency in Business Central: Parallel processes without deadlocks and timeouts (video): “Concurrency in Business Central: Parallel processes without deadlocks and timeouts”
- Business Central Under the Hood episode 12: Evolving AL for Performance (video): “Evolving AL for Performance optimization data transfer set load fields”
- How Good Can AL Code Get? — A Live ISO 5055 Review (video): “Read Isolation and Concurrency Rule; Lock release on variable scope”
- Business Central Under the Hood episode 5: How To Make Your AL Code Super Fast (video): “al code performance; database optimization; sql queries; indexing; caching”
- Business Central 29.0: Major Change to Table Extensions & SQL. (video): “Improved database operation performance for extensions; Partial record loading with set load field”
Source: Microsoft Learn (CC BY 4.0). Descriptions are Learn’s own.