Hi can
somebody tell me the field 'DateStatus' on inventtrans is set at what
points?
I am
just trying to improve performance on inventtrans searchs and can see the index
'StatusItemIdx' is useful to me. Basically I want to find all the
inventtrans cost for sales invoices for a period of time and hence why any index
that has a date in it would be very useful.
My
thinking is if date financial exists on inventtrans can I assume date status
will ALWAYS be the same date as financial for that particular inventtrans
record? And therfore replace in my select using datefinancial with
datastatus...
Part
of my select originally would be (basically the std select to calc cost for
an custinvoicetrans but with date range added):
&& inventTrans.dateFinancial >=
_runStart
&& inventTrans.dateFinancial <= _runEnd
&& inventTrans.ItemId == 'ABC'
&& inventTrans.dateFinancial <= _runEnd
&& inventTrans.ItemId == 'ABC'
&&
inventTrans.qty
!=
0
&& inventTrans.packingSlipReturned == 0
&& inventTrans.statusReceipt <= StatusReceipt::Purchased
&& inventTrans.statusIssue <= StatusIssue::Sold
&& _invoiceTrans.InventTransId != ""
&& inventTrans.packingSlipReturned == 0
&& inventTrans.statusReceipt <= StatusReceipt::Purchased
&& inventTrans.statusIssue <= StatusIssue::Sold
&& _invoiceTrans.InventTransId != ""
but I
am wondering can I change it to:
&& inventTrans.dateStatus >=
_runStart
&& inventTrans.dateStatus <= _runEnd
&& inventTrans.ItemId == 'ABC'
&& inventTrans.dateStatus <= _runEnd
&& inventTrans.ItemId == 'ABC'
&&
inventTrans.qty
!=
0
&& inventTrans.packingSlipReturned == 0
&& inventTrans.statusReceipt <= StatusReceipt::Purchased
&& inventTrans.statusIssue <= StatusIssue::Sold
&& _invoiceTrans.InventTransId != ""
&& inventTrans.packingSlipReturned == 0
&& inventTrans.statusReceipt <= StatusReceipt::Purchased
&& inventTrans.statusIssue <= StatusIssue::Sold
&& _invoiceTrans.InventTransId != ""
and be
sure of always getting the same result (i.e. once data finanical then the
inventtrans datastatus will not change)?
Also I
am just wondering the order of my where clause statements is important or
not? I know in XAL previously that supposedly it was best to put them in
the same order as the fields used in the index but not sure if any such
'feature' is still present in Axapta????
If I
can use dateStatus would you recommend I use this StatusItemIdx as an index
hint? I am just wondering since ItemId is not the first component then to
me the search will have to go through ALL inventtrans that are sold or
purchased. If I use an index with itemid as the first component then the
search will immediately be narrowed down to the item
Thanks
James
Sharing the knowledge on Axapta.
SPONSORED LINKS
Business finance course | Business to business finance | Small business finance |
Business finance consultant | Business finance magazine | Business finance uk |
YAHOO! GROUPS LINKS
- Visit your group "Axapta-Knowledge-Village" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.