24.01.2019, 14:31 | #9 |
Участник
|
1. 150.
2. SELECT SUM(T1.PHYSICALINVENT), SUM(T1.RESERVPHYSICAL), SUM(T1.RESERVORDERED), SUM(T1.ONORDER), SUM(T1.QUOTATIONISSUE), SUM(T1.ARRIVED), SUM(T1.ORDERED), SUM(T1.QUOTATIONRECEIPT), T1.ITEMID, T2.CONFIGID, T2.INVENTSIZEID, T2.INVENTSTYLEID, T2.INVENTSITEID, T2.INVENTLOCATIONID, T2.INVENTBATCHID, T2.INVENTSTATUSID FROM INVENTSUM T1 CROSS JOIN INVENTDIM T2 WHERE (((T1.PARTITION=5637144576) AND (T1.DATAAREAID=N'bb1')) AND (((T1.CLOSED=0) AND (T1.CLOSEDQTY=0)) AND (T1.ITEMID=N'AS00013021'))) AND (((T2.PARTITION=5637144576) AND (T2.DATAAREAID=N'bb1')) AND (((((((T2.CONFIGID=N'v2') AND (T2.INVENTSIZEID=N'12')) AND (T2.INVENTSTYLEID=N'2018')) AND (T2.INVENTSITEID=N'A')) AND (T2.INVENTLOCATIONID=N'A1')) AND (T2.INVENTSTATUSID=N'Blocked')) AND (T1.INVENTDIMID=T2.INVENTDIMID))) GROUP BY T1.ITEMID, T2.CONFIGID, T2.INVENTSIZEID, T2.INVENTSTYLEID, T2.INVENTSITEID, T2.INVENTLOCATIONID, T2.INVENTBATCHID, T2.INVENTSTATUSID ORDER BY T1.ITEMID, T2.CONFIGID, T2.INVENTSIZEID, T2.INVENTSTYLEID, T2.INVENTSITEID, T2.INVENTLOCATIONID, T2.INVENTBATCHID, T2.INVENTSTATUSID |
|
Теги |
ax2012r3, sql server 2016, план запроса, производительность |
|
|