Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

DELETE FROM VENDPAYMSCHEDLINE WHERE..... (SQL Script running multiple times)

Posted on by Microsoft Employee

Hi all, 

We have recently configured Dynamics Perf software and is running successfully. When investigating the result we see a DELETE query running multiple time throughout the day and taking a considerable amount of resource in the process. 

The script is

DELETE FROM VENDPAYMSCHEDLINE WHERE ((RECID=@P1) AND (RECVERSION=@P2))

Does anyone know where the script is scheduled to run and what this is used for?

Many thanks

*This post is locked for comments

  • Martin Dráb Profile Picture
    Martin Dráb 230,188 Most Valuable Professional on at
    RE: DELETE FROM VENDPAYMSCHEDLINE WHERE..... (SQL Script running multiple times)

    Look at whether the query itself is slow, or it's actually waiting for a lock to be released. I think the latter case is more likely.

    If you're interested in where the table is used, you can use cross references in AX and/or AX query trace log in DynamicsPerf.

  • RE: DELETE FROM VENDPAYMSCHEDLINE WHERE..... (SQL Script running multiple times)

    Having the similar issues , Is there any findings to resolve it. 

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,253 Super User 2024 Season 2 on at
    RE: DELETE FROM VENDPAYMSCHEDLINE WHERE..... (SQL Script running multiple times)

    Hi Dan,

    Thanks for the feedback. It is good to keep monitoring. There can be many factors which can cause slowness on specific moments.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: DELETE FROM VENDPAYMSCHEDLINE WHERE..... (SQL Script running multiple times)

    Hi Andre - sorry for the delay.

    I've checked the fragmentation and it was around 60%. I've since dropped the index and recreated. This issue hasn't cropped up since but I'm thinking it was actually another issue which caused this process to run slowly.

    I shall continue to monitor and report back any changes,

    Thanks again,

    Dan

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,253 Super User 2024 Season 2 on at
    RE: DELETE FROM VENDPAYMSCHEDLINE WHERE..... (SQL Script running multiple times)

    Hi GSD,

    It could be caused by user actions while they are working in this area. You can try to find out where in AX 2012 this table is used on forms or in coding. Have you tried to see if there are fragmented indexes on this table which can cause high resource consumption?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans