Hi Again, You guys were so helpful with my last question, here I am again
Do excuse me, I 'm just a DBA so understand I don't have much (any) knowledge on application side.
We upgraded our Database from SQL Server 2014 to 2016 and have enabled query store, but it keeps filling up.
Investigation shows almost all queries are of format as below:
(@P1 int,@P2 int,@P3 nvarchar(11),@P4 datetime2(7),@P5 datetime2(7),@P6 datetime2(7),@P7 nvarchar(21),@P8 nvarchar(21),@P9 nvarchar(5))SELECT T1.ITEMRELATION,T1.ACCOUNTRELATION,T1.AMOUNT,T1.INVENTDIMID,T1.FROMDATE,T1.TODATE,T1.ITEMCODE,T1.ACCOUNTCODE,T1.UNITID,T1.RECID,T1.CURRENCY,T1.DATAAREAID FROM PRICEDISCTABLE T1 WHERE (((PARTITION=5637144576) AND (DATAAREAID IN (SELECT DATAAREAID FROM ##Tmp75697757FA474E828188E79A5D23CE16) )) AND (((((((ITEMCODE=@P1) AND (ACCOUNTCODE=@P2)) AND NOT ((UNITID=@P3))) AND (FROMDATE<=@P4)) AND ((TODATE>=@P5) AND (TODATE<=@P6))) AND (ACCOUNTRELATION=@P7)) AND ((ITEMRELATION=@P8) AND (DATAAREAID=@P9)))) ORDER BY T1.RELATION,T1.ACCOUNTCODE,T1.ACCOUNTRELATION,T1.CURRENCY,T1.ITEMCODE,T1.ITEMRELATION,T1.UNITID,T1.QUANTITYAMOUNTFROM,T1.FROMDATE,T1.AGREEMENTHEADEREXT_RU
(@P1 int,@P2 int,@P3 nvarchar(11),@P4 datetime2(7),@P5 datetime2(7),@P6 datetime2(7),@P7 nvarchar(21),@P8 nvarchar(21),@P9 nvarchar(5))SELECT T1.ITEMRELATION,T1.ACCOUNTRELATION,T1.AMOUNT,T1.INVENTDIMID,T1.FROMDATE,T1.TODATE,T1.ITEMCODE,T1.ACCOUNTCODE,T1.UNITID,T1.RECID,T1.CURRENCY,T1.DATAAREAID FROM PRICEDISCTABLE T1 WHERE (((PARTITION=5637144576) AND (DATAAREAID IN (SELECT DATAAREAID FROM ##Tmp6A9EE1F985E947B2A2C26885B3F5B164) )) AND (((((((ITEMCODE=@P1) AND (ACCOUNTCODE=@P2)) AND NOT ((UNITID=@P3))) AND (FROMDATE<=@P4)) AND ((TODATE>=@P5) AND (TODATE<=@P6))) AND (ACCOUNTRELATION=@P7)) AND ((ITEMRELATION=@P8) AND (DATAAREAID=@P9)))) ORDER BY T1.RELATION,T1.ACCOUNTCODE,T1.ACCOUNTRELATION,T1.CURRENCY,T1.ITEMCODE,T1.ITEMRELATION,T1.UNITID,T1.QUANTITYAMOUNTFROM,T1.FROMDATE,T1.AGREEMENTHEADEREXT_RU
Notice the global temporary table for the DATAAREAID is different each time.
Is this standard Dynamics AX process or query, or do you think it might be some customization? If the latter where might we look to change it?
Thanks in advvance