Hi group,
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] Sharing the knowledge on Axapta. Visit www.frappr.com/axapta for axapta friends. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/Axapta-Knowledge-Village/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/