Quantcast
Channel: AX Developer Forum
Viewing all articles
Browse latest Browse all 9880

PurchUpdatePackingSlip Query Performance

$
0
0

Hi,

     I was working with a performance issue in Dynamics Ax 2009 , "PurchEditLines" form (AccPayable-->Periodic--> Purchase Order Update-->Invoice). The user clicks the select button, which loads the "SysQueryForm" form with AOT query "PurchUpdatePackingSlip". Then put two parameters, Invoice Account(from Purchase Orders table) , and Physical date (from Inventory transactions).

But it take hours to load the result. When I check  the SQL query that is executing, I found the search condition "Physical Date" was applied on the "On" clause of the Left Join, not on the "Where" clause of the query.

And this causes the query to return more than 100 thousand rows and then filter it in the client to show around 10 rows.

I changed the Join mode of the Inventrans table in query, "PurchUpdatePackingSlip"  from OuterJoin to InnerJoin and the problem solved.

But I know it is not correct to change a query in AOT(in Sys Layer) only for this.

But in Ax 2009, the filter in Query Ranges are applied in the Join condition and will cause performance hit in Outer Joins. Is there any work around to this problem Sad ?


Viewing all articles
Browse latest Browse all 9880

Trending Articles