Sql-server – POS Performance Issue AX 2012 R3

microsoft-dynamicsperformancequery-performancesql serversql-server-2016

I have slowness.

Can anyone review this plan (PasteThePlan) and tell me what I need to optimize? This is the actual plan.

That is a part of process to get Customer Info from an application. In a trace I found that query takes a long time. It took about 14 sec and in another POS it took less than 1 sec.

I'm using SQL Server 2016 – Express Edition

Best Answer

Assuming this is the store database for a Retail POS and not your main AX database you should be fine running it on Express Edition. Since the store database only contains a subset the data necessary for the store to function without a permanent connection to the main system, and transactions should only be kept for the time needed to allow the system to sync to the main database these store databases are usually fairly small.

However, your estimates are way off (now that you posted the actual plan) in this database, which could explain why your query runs better on another POS (assuming you mean that is in a different store/location with another database behind it) if that database happens to have better statistics.

Please see AX Retail: Retail store maintenance and SQL Express to see how you can schedule maintenance with SQLCMD, but I would suggest you use Ola Hallengren's scripts instead, the FAQ explains how to set it up on a SQL Server Express instance.

I also think you have customized the logisticselectronicaddress table, so you might want to review the indexing on that table, or post the table definition here so we can help you.