code change · performancePlatform, DevOps & Performanceofficial - Microsoftreviewed - checked by Opus

#13952 Add key on Email Message Attachment Data to speed up email deletion

A database key is added on the Data field of Email Message Attachment table to significantly improve performance when deleting emails, particularly during email storage cleanup operations.

Pull request · merged into main (BC30) on 2026-11-12 by mynjj · 1 file (+4 -0), 1 AL · performance · tier official · reviewed (checked by Opus)

What changed

  • Adds an index on the Data media field to avoid full table scans during attachment deletion
  • Directly improves email deletion performance for large tenants
  • Uses the same approach as the existing Document Attachment table key
  • Addresses performance bottleneck in Payables Agent email cleanup

AL objects touched

Context

  • Work items: AB#658823
  • Labels: AL: System Application, Team: Integrations
  • Systems: platform

No source states these links: they share an object, a model read them, or a person found the same subject.

  • Send documents and emails — possibly related: Documents email and attachment functionality that benefits from database performance optimization. (model-linked)

Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).