дело похоже в базе, радом стоит копия этой база в ней нет проблем ...
если я не ошибся то тут тормоза
insert into Supermag.TTArticleData (SpecItem,AvlQuantity,ItemPrice,DocType,CreatedAt,OpCode,LocFrom,LocTo,ClientIndex,NCauseDoc,CauseSpecItem,TotalSum,TotalSumNoVAT,DocID,UserOp,PayCash,GoodsOwner,TotalSumNoTax,CurrencyType,VATRate,TotalSumCur,CauseType,CauseID,Location,NativeDocType) select S.SpecItem,S.AvailQuantity * 1000 ,nvl(S.ItemPrice,0),S.DocType,S.CreatedAt,S.OpCode ,nvl(S.LocationFrom, -1),nvl(S.LocationTo,-1),nvl(S.ClientIndex,-1),-1 NCauseDoc,nvl(S.CauseSpecItem,-1),S.TotalPrice TotalSum,S.TotalPrice-nvl(ST.TaxSum,0) TotalSumNoVAT,S.ID DocID,nvl(S.UserOp,-1),nvl(nvl(XIn.PayCash,XOut.PayCash),decode(S.DocType,'CS','1','CR','1','0')) PayCash,nvl(XIn.GoodsOwner,0) GoodsOwner,nvl(S.TotalPriceNoTax,nvl(S.ItemPriceNoTax,0)*S.Quantity) TotalSumNoTax,S.CurrencyType,nvl(ST.TaxRate,0) VATRate,TotalPriceCur TotalSumCur,S.CauseType,S.CauseID,-1,1 from (select nvl(T.Quantity,nvl(FS.AvailQuantity,S.Quantity)) AvailQuantity,D.DocType,D.ID,D.CreatedAt,D.OpCode,D.UserOp,D.LocationFrom,D.LocationTo,D.Location,D.ClientIndex,D.CurrencyType,S.CauseSpecItem,S.CauseType,S.CauseID,S.SpecItem,S.Quantity,S.ItemPrice,S.TotalPrice,S.ItemPriceNoTax,S.TotalPriceNoTax,S.TotalPriceCur from Supermag.SMSpec S,Supermag.SMDocuments D,Supermag.TTFIFOAltSpec T,Supermag.FFSpec_ FS where S.DocType=D.DocType and S.DocID=D.ID and T.DocID(+)=S.DocID and T.DocType(+)=S.DocType and T.SpecItem(+)=S.SpecItem and FS.EndDate(+)=to_date('31.12.2008','DD.MM.YYYY') and FS.DocType(+)=S.DocType and FS.DocID(+)=S.DocID and FS.SpecItem(+)=S.SpecItem and S.Article=:Article and S.DocType in ('CS','CR','IW','WI','WO','PE','PO','PN') and ( (D.DocState=3 and (D.Createdat>=to_date('31.12.2008','DD.MM.YYYY') or FS.AvailQuantity > 0)) or exists (select * from Supermag.TTDocList T where T.DocType=D.DocType and T.ID=D.ID)) ) S,Supermag.SMWayBillsIn XIn,Supermag.SMWayBillsOut XOut,Supermag.SMSpecTax ST WHERE S.DocType=XIn.DocType(+) and S.ID=XIn.ID(+) and S.DocType=XOut.DocType(+) and S.ID=XOut.ID(+) and S.DocType=ST.DocType(+) and S.ID=ST.DocID(+) and S.SpecItem=ST.SpecItem(+) and ST.TaxID(+)=1