13.04.2017, 10:06 | #1 |
Участник
|
План запроса, использование tempdb
Добрый день.
AX 2009, SQL Server 2008 R2 Подскажите, пожалуйста, имеется план и запрос: Код: DECLARE @P1 NVARCHAR(5), @P2 NVARCHAR(41), @P3 NUMERIC(28, 12), @P4 NVARCHAR(5), @P5 NVARCHAR(11), @P6 NVARCHAR(31), @P7 NVARCHAR(11), @P8 NVARCHAR(11), @P9 NVARCHAR(5), @P10 NVARCHAR(11), @P11 NVARCHAR(16), @P12 INT; SELECT A.ITEMID, A.MININVENTONHAND, A.MAXINVENTONHAND, B.ECC_BUSINESSUNITID, B.INVENTSIZEID, B.INVENTCOLORID, B.INVENTLOCATIONID FROM REQITEMTABLE A, INVENTDIM B WHERE A.DATAAREAID=@P1 AND A.ITEMID=@P2 AND A.MININVENTONHAND>@P3 AND B.DATAAREAID=@P4 AND B.INVENTDIMID=A.COVINVENTDIMID AND B.INVENTSIZEID=@P5 AND B.INVENTCOLORID=@P6 AND B.INVENTLOCATIONID=@P7 AND B.ECC_BUSINESSUNITID=@P8 AND EXISTS ( SELECT 'x' FROM ECC_REQLOCATIONPROFILELINES C WHERE C.DATAAREAID=@P9 AND C.INVENTLOCATIONID=B.INVENTLOCATIONID AND C.INVENTLOCATIONIDREQMAIN=@P10 AND C.REQLOCATIONPROFILEID=@P11 AND C.INPLANNING=@P12 ) GROUP BY A.ITEMID, A.MININVENTONHAND, A.MAXINVENTONHAND, B.ECC_BUSINESSUNITID, B.INVENTSIZEID, B.INVENTCOLORID, B.INVENTLOCATIONID ORDER BY A.ITEMID, A.MININVENTONHAND, A.MAXINVENTONHAND, B.ECC_BUSINESSUNITID, B.INVENTSIZEID, B.INVENTCOLORID, B.INVENTLOCATIONID; Подскажите, выделенный красным оператор в плане (CWT_PrimaryKey):
|
|