web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

delete_from hangs up

(0) ShareShare
ReportReport
Posted on by 942

Hello everyone,

I'm trying to delete multiple records at a time using delete_from sql command. It is said here

https://docs.microsoft.com/en-us/dynamicsax-2012/developer/delete-from

that if I have delete method overridden isystem interprets the delete_from statement into code that calls the delete method one time for each row that is deleted.

I don't have delete method overridden but this command hangs up. I also tried some other trick like

        mytable.skipDeleteActions(true);
        mytable.skipDeleteMethod(true);
        mytable.skipEvents(true);

        delete_from mytable
            where mytable.createdDateTime < utcCurrentStoringPeriod;

what can cause such behavior? Can you pls help me?

Thanks.

I have the same question (0)
  • Martin Dráb Profile Picture
    236,471 Most Valuable Professional on at
    RE: delete_from hangs up

    It's difficult to simply guess what's going on in your system. You should collect more information - consider using Trace Parser for that.

    For example, you may have a problem with an index, or there may be database log set up causing deletes execute row by row, or who knows...

  • dark_knight Profile Picture
    942 on at
    RE: delete_from hangs up

    I used method skipDataBaseLog() on the table with no results. Is TraceParser some native utilities for ax?

  • Verified answer
    Martin Dráb Profile Picture
    236,471 Most Valuable Professional on at
    RE: delete_from hangs up

    Data is collected through ETW, Event Tracing for Windows, which a part of Windows operation system. Trace Parser itself is a separate application for analyzing these logs.

    Note that this is not your only option, you can also use things like SQL trace in AX and standard features of SQL Server (profiler, extended events etc.). If you want deal with performance problems, it's crucial to be able to measure both X++ code execution and database queries, therefore you must learn some of these tools.

  • dark_knight Profile Picture
    942 on at
    RE: delete_from hangs up

    Thanks Martin. I will do.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 1,964

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 823 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 564 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans