Steeve Gilbert wrote:
> I have a big delay (5 min) when doing a select on InventTrans.  It
> happens at line 55 of MarkupAdjustment.adjustInvoice().
>
> Here's the line:
> inventTrans.inventTransId         == vendInvoiceTrans.inventTransId
> && inventTrans.dateFinancial         == vendInvoiceTrans.InventDate
> && inventTrans.invoiceId             == vendInvoiceTrans.invoiceId
> && inventTrans.statusReceipt         == StatusReceipt::Purchased
> && inventTrans.statusIssue           == StatusIssue::None
> && inventTrans.packingSlipReturned   == 0
> && ! inventAdjustAllocate.isAllocated(){
>   ...
> }
>

I suppose that if   "inventAdjustAllocate.isAllocated()"  is in the where
clause the query can not be execute entirely on the SQL server, so for every
record returned the kernel/application have to evaluate the result of the
execution of the method above.
After the first execution the record are in cache and so the time for the
execution decrease.
If this is really the problem, create an index is not necessary because the
problem is not on the database

--
Roberto Ukmar
Indis S.p.A.



Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to