|
10.08.2007, 10:20 | #1 |
Участник
|
а если поставить писаться в базу хотя бы самые долгие запросы - какой самый долгий? сколько выполняется?
|
|
10.08.2007, 10:24 | #2 |
Участник
|
Запрос получаеться следующий:
Код: SELECT A.ITEMGROUPID,A.ITEMID,A.ITEMNAME,A.ITEMTYPE,A.PURCHMODEL,A.HEIGHT,A.WIDTH,A.SALESMODEL,A.COSTGROUPID,A.REQGROUPID,A.PRIMARYVENDORID,A.NETWEIGHT,A.DEPTH,A.UNITVOLUME,A.BOMUNITID,A.DENSITY,A.DEL_SCRAPTYPEID,A.DIMENSION,A.DIMENSION2_,A.DIMENSION3_,A.DIMENSION4_,A.DIMENSION5_,A.COSTMODEL,A.USEALTITEMID,A.ALTITEMID,A.STOPEXPLODE,A.DEL_COVPERINVENTLOCATION,A.PHANTOM,A.BOMLEVEL,A.BATCHNUMGROUPID,A.AUTOREPORTFINISHED,A.DEL_CONFIGACTIVE,A.ABCTIEUP,A.ABCREVENUE,A.ABCVALUE,A.ABCCONTRIBUTIONMARGIN,A.DEL_BARCODE,A.DEL_BARCODETYPE,A.SALESPERCENTMARKUP,A.SALESCONTRIBUTIONRATIO,A.SALESPRICEMODELBASIC,A.MINAVERAGESETTLE,A.NAMEALIAS,A.GROSSDEPTH,A.GROSSWIDTH,A.GROSSHEIGHT,A.SERIALNUMGROUPID,A.DIMGROUPID,A.MODELGROUPID,A.ITEMBUYERGROUPID,A.TAXPACKAGINGQTY,A.DEL_TEMPLATE,A.STOPEXPLODEPRICE,A.TARAWEIGHT,A.SCRAPVAR,A.SCRAPCONST,A.ITEMDIMCOMBINATIONAUTOCREATE,A.ITEMDIMCOSTPRICE,A.GROSSWEIGHT_RU,A.PACKING_RU,A.DKL_ITEMCLASS,A.DKL_BRANDID,A.DKL_ASSORTCODEID,A.DKL_WEIGHTITEM,A.DKL_DISCLIMIT,A.DKL_ITEMNAMECHEQUE,A.DKL_ITEMEXTCODE,A.DKL_INVENTGTDID,A.DKL_NORMLOSSGROUPID,A.DKL_INTERCOMPANYPRICE,A.DKL_INVENTCLASSVARID,A.FORECASTDMPINCLUDE,A.DEL_GROSSWEIGHT_RU,A.INTRASTATEXCLUDE_LT,A.INTRASTATWEIGHT_CZ,A.PKWIUCODE_PL,A.SADRATECODE_PL,A.RET_CHARSETID,A.MEL_OWN,A.MEL_DATENOVELTY,A.MEL_VENDACCOUNTROYALTY,A.MEL_NOVELTYCATEGORY,A.MEL_VENDCATEGORY,A.MEL_CHARVALUEDIM,A.MEL_CHARVALUEDIM2_,A.MEL_CHARVALUEDIM3_,A.MEL_CHARVALUEDIM4_,A.MEL_CHARVALUEDIM5_,A.MEL_LASTPURCHPRICE,A.MEL_FORCEDRATING,A.MEL_DATEFORCEDRATING,A.MEL_FORCEDRATINGDAYS,A.MEL_ITEMCATEGORYID,A.MEL_REQNOTRETURNDATE,A.MEL_REQISNOTRETURN,A.MEL_REQITEMGROUPID,A.RECID,B.ITEMID,B.MODULETYPE,B.UNITID,B.PRICE,B.PRICEUNIT,B.MARKUP,B.LINEDISC,B.MULTILINEDISC,B.ENDDISC,B.QUANTITY,B.LOWESTQTY,B.HIGHESTQTY,B.TAXITEMGROUPID,B.BLOCKED,B.DELIVERYTIME,B.INVENTLOCATIONID,B.MANDATORYINVENTLOCATION,B.STANDARDQTY,B.MARKUPGROUPID,B.PRICEDATE,B.PRICEQTY,B.ALLOCATEMARKUP,B.OVERDELIVERYPCT,B.UNDERDELIVERYPCT,B.CALENDARDAYS,B.DKL_LOCKED,B.RECID,C.ITEMID,C.MODULETYPE,C.UNITID,C.PRICE,C.PRICEUNIT,C.MARKUP,C.LINEDISC,C.MULTILINEDISC,C.ENDDISC,C.QUANTITY,C.LOWESTQTY,C.HIGHESTQTY,C.TAXITEMGROUPID,C.BLOCKED,C.DELIVERYTIME,C.INVENTLOCATIONID,C.MANDATORYINVENTLOCATION,C.STANDARDQTY,C.MARKUPGROUPID,C.PRICEDATE,C.PRICEQTY,C.ALLOCATEMARKUP,C.OVERDELIVERYPCT,C.UNDERDELIVERYPCT,C.CALENDARDAYS,C.DKL_LOCKED,C.RECID,D.ITEMID,D.MODULETYPE,D.UNITID,D.PRICE,D.PRICEUNIT,D.MARKUP,D.LINEDISC,D.MULTILINEDISC,D.ENDDISC,D.QUANTITY,D.LOWESTQTY,D.HIGHESTQTY,D.TAXITEMGROUPID,D.BLOCKED,D.DELIVERYTIME,D.INVENTLOCATIONID,D.MANDATORYINVENTLOCATION,D.STANDARDQTY,D.MARKUPGROUPID,D.PRICEDATE,D.PRICEQTY,D.ALLOCATEMARKUP,D.OVERDELIVERYPCT,D.UNDERDELIVERYPCT,D.CALENDARDAYS,D.DKL_LOCKED,D.RECID,E.ITEMID,E.DEL_CONFIGID,E.DEL_INVENTLOCATIONID,E.DEL_COVRULE,E.DEL_COVPERIOD,E.DEL_MININVENTONHAND,E.DEL_MAXINVENTONHAND,E.COUNTGROUPID,E.DEL_DELIVERYTIME,E.COUNTINGSTARTED,E.COUNTINGJOURNALID,E.INVENTDIMID,E.RECID,F.NAME,F.STATUS,F.RECID,G.ITEMID,G.BASEPRICE,G.FORECASTBASEPRICE,G.PRICECHANGED,G.MINRETAILMARGIN,G.RECID,H.ITEMID,H.STOPEXPLODE,H.PURCHABLEITEM,H.PRIMARYVENDORID,H.REQGROUPID,H.INVENTSTATUS,H.USEASSORTMATRIX,H.RECID,I.ITEMBARCODE,I.ITEMID,I.DEL_CONFIGID,I.INVENTDIMID,I.BARCODESETUPID,I.USEFORPRINTING,I.USEFORINPUT,I.DESCRIPTION,I.QTY,I.MODIFIEDDATE,I.MODIFIEDTIME,I.MODIFIEDBY,I.RECID FROM INVENTTABLE A(NOLOCK) ,INVENTTABLEMODULE B(NOLOCK) ,INVENTTABLEMODULE C(NOLOCK) ,INVENTTABLEMODULE D(NOLOCK) ,INVENTITEMLOCATION E(NOLOCK) ,DKL_BRANDTABLE F(NOLOCK) ,DKL_BASERETAILPRICES G(NOLOCK) ,DKL_INVENTTABLE H(NOLOCK) ,INVENTITEMBARCODE I(NOLOCK) WHERE (A.DATAAREAID='mhv') AND ((B.DATAAREAID='mhv') AND ((B.MODULETYPE=1) AND (A.ITEMID=B.ITEMID))) AND ((C.DATAAREAID='mhv') AND ((C.MODULETYPE=0) AND (A.ITEMID=C.ITEMID))) AND ((D.DATAAREAID='mhv') AND ((D.MODULETYPE=2) AND (A.ITEMID=D.ITEMID))) AND ((E.DATAAREAID='mhv') AND ((E.INVENTDIMID=' Axapta') AND (A.ITEMID=E.ITEMID))) AND ((F.DATAAREAID='mhv') AND (A.DKL_BRANDID=F.BRANDID)) AND ((G.DATAAREAID='mhv') AND (A.ITEMID=G.ITEMID)) AND ((H.DATAAREAID='mhv') AND ((H.INVENTSTATUS=1) AND (A.ITEMID=H.ITEMID))) AND ((I.DATAAREAID='mhv') AND ((I.INVENTDIMID=' Axapta') AND (A.ITEMID=I.ITEMID))) ORDER BY A.DATAAREAID,A.ITEMID OPTION(FAST 1) . ТОЧНО ТАКОЙ же запрос на сиквел2000 4 секунды Последний раз редактировалось Aleksey_M; 10.08.2007 в 11:13. Причина: Запрос выделил в [code] чтоб страницу не распирал. |
|
|
Опции темы | Поиск в этой теме |
Опции просмотра | |
|