I'm trying to improve performance in some part of our application.
I've stumble on a view that end up doing a table scan on SalesLine. I
thought their must be missing index, that's why the table scan is
required. It wasn't the case; all the required indexes were there.
I've replicate the view's work in a select with joins to see if it would
end up having the same execution plan. Here's the test :
BOAOrderToProduce orderToProd;
SalesLine salesL;
InventTable invTab;
BOAOrderToProduceGrouped Grouped; // the View
// Query that replicate the view
WHILE SELECT sum(qty), DimColorTxt from orderToProd
join salesL group by ItemId, BOAForecastProdDate, ConfirmedDlv
where salesL.InventTransId == orderToProd.InventTransId
join invTab group by Dimension, ItemGroupId, PackagingGroupId
where invTab.ItemId == salesL.ItemId {
}
WHILE SELECT Grouped {
}
Result : it is not using the same execution plan. The joined select
uses the right indexes but the view is not and cause bad performance.
On the X++ side I could just replace the code which would look uglier
but would still be faster, but the problem is that I use that view in a
dataSource's form.
Any idea on how to improve performance of that view?
Thanks.
Regards,
Steeve...
[Non-text portions of this message have been removed]
SPONSORED LINKS
Computer part | Programming languages | Microsoft axapta |
Support exchange |
YAHOO! GROUPS LINKS
- Visit your group "development-axapta" 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.