Hi,
I've created a static class that are reuseable in many reports. The
problem is that it's slow and causing SQL to eat up a lot of physical
memory.
Can anyone of you pls take a look at these static class and advice
what is the best practice to reduce the memory usage in SQL.
Below is one of the example where I select all ItemId from Item
Master, call below static class and pass in ItemId one by one as I
need to display each item in rows.
static InventQty GetExtWIPQty(ItemId _itemid)
{
ProdTable _ProdTable;
ProdBom _ProdBom;
;
Select ItemId, Sum(QtyBomCalc)
from _ProdBom join _ProdTable
group by ItemId
where _ProdBom.ItemId == _itemId
&& _ProdBom.ProdId == _ProdTable.ProdId
&& (_ProdTable.ProdStatus == ProdStatus::Scheduled
|| _ProdTable.ProdStatus == ProdStatus::Released
|| _ProdTable.ProdStatus == ProdStatus::StartedUp)
&& _ProdTable.ProdType == ProdType::Vendor;
return _ProdBom.QtyBOMCalc;
}
Thks in adv,
Best rgs,
Yong.
| Yahoo! Groups Sponsor |
| Get unlimited calls to U.S./Canada |
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

