Overcoming parameter sniffing issue in Microsoft Dynamics AX 2012-R2 – CU6

Parameter sniffing is the default behavior that SQL Server uses when compiling parameterized SQL statements. When a stored procedure or a parameterized SQL statement is compiled or recompiled, the parameter values passed for that invocation are “sniffed” and used for cardinality estimation. The net effect is that the plan is optimized as if those specific…

7

Improving SSRS Report Performance at Line level – Part 5

Inevitably, we can’t completely get rid of all line-based data accesses or calculations. So, we discuss here a few ways to improve without change the basic report logic. Remove duplicated DB calls Most of the duplicated DB calls are hidden deep in the stack. For example, Vendor report calls DirPartyTable::ElectornicAddressType2primaryFieldId() 4 times (4 db access)…

0

Improving SSRS Query-based Report Performance by not Using Display Methods – Part 3

This post is about Query based reports in Ax2012. Ax2012 supports table display method in query based reports. It is convenient to use. For example, the query for VendDueReportDetail is on VendTable and looks like this in VS designer:   The table display methods above look up VendInvoiceJour and VendTrans tables to get the last…

2

Improving SSRS Report Performance by Applying Filters/Ranges Earlier – Part 2

We post it second because it is a low hanging fruit for better performance. One example helps explains this pattern. Here is a code excerpt from CustTransOpenPerDate report. perDate = contract.parmPerDate(); while (queryRun.next())     {         if (queryRun.changed(tablenum(CustTable)))         {             custTable = queryRun.get(tablenum(CustTable));         }         custTrans = queryRun.get(tablenum(CustTrans));           if (custTrans.TransDate <=…

0

Improving SSRS Report Performance with Set-Based Operations – part 1

Introduction Ax reports were migrated to Microsoft SSRS in Ax2012, mostly in the form of Report Data Provider classes (RDP).  We want to share with our customers and ISVs, through this series of blogs, with some best practices to improve SSRS report performance.  Our goal is to improving report performance without introducing much disruptions or…

0