community postAL Developmentcommunity - not Microsoftreviewed - checked by Opus

Truncate vs. DeleteAll: Speed in Dynamics 365 Business Central AL

The new Truncate AL method in Business Central 2025 Wave 2 deletes large data volumes 118 times faster than DeleteAll by bypassing triggers and event subscriptions, but only works on specific table types without certain field types or security restrictions.

post Aardvark Labs

Marcel Chabot · 2025-10-10 · 426 words · about 2 min

"Truncate, the new kid on the block, comes in at a blistering 166 milliseconds. 118 times faster than Delete All!"

Key points

  • Truncate deletes 500,000 records in 166 milliseconds versus 19.5 seconds for DeleteAll and 648 seconds for Record.Delete in a loop
  • Truncate cannot be used on tables with OnDelete triggers, event subscriptions, media fields, system tables, or when security filters apply
  • A fail-through delete pattern is recommended to use Truncate first and fall back to DeleteAll if it fails
  • Truncate locks the entire table during operation, which is why it achieves such speed by bypassing row-by-row processing

Quotes

  • “Truncate, the new kid on the block, comes in at a blistering 166 milliseconds. 118 times faster than Delete All!” (Demonstrates the dramatic performance improvement of Truncate over existing deletion methods for large data volumes)

AL objects mentioned

As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.

  • table “ARD_ItemStaging”

Not found in BC28-30: table “ARD_ItemStaging”.

Context

  • Features: Truncate method, DeleteAll method, Record.Delete, data deletion, bulk delete operations, table locking
  • Versions: 2025 Release Wave 2, Version 27.0

Source: Aardvark Labs, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.