RE: [Axapta-Knowledge-Village] Re: Select Sum slow performance

2010-07-09 Thread Malcolm Burtt
@yahoogroups.com Subject: Re: [Axapta-Knowledge-Village] Re: Select Sum slow performance HI @mgk915 : My table is InventSettlement and I sum field CostAmountAdjustment and using where in fields : ItemID, TransDate, Cancelled and SettleModel. If I only create the index for that where statement, my

[Axapta-Knowledge-Village] Re: Select Sum slow performance

2010-07-08 Thread mgk915
Do you have an index on the table that could make it quicker to select the records for the sum? So, for example, if you are getting a total on Sales by SalesStatus, using the SalesLine table, then there is an index (already setup) called StatusItemIdx that could speed up the processing. So you

Re: [Axapta-Knowledge-Village] Re: Select Sum slow performance

2010-07-08 Thread Donny Wu
Hi, Yes I have 2 index, currently my cluster index is use another index but if I change the cluster into index that I use for select it will boost the performance and in this case it will slow the other query that use the other index. dwu On Thu, Jul 8, 2010 at 7:28 PM, mgk915

[Axapta-Knowledge-Village] Re: Select Sum slow performance

2010-07-08 Thread mgk915
Yes, you do not want to change an existing index. Can you tell me what table and field you have the sum on? --- In Axapta-Knowledge-Village@yahoogroups.com, Donny Wu doni...@... wrote: Hi, Yes I have 2 index, currently my cluster index is use another index but if I change the cluster into

[Axapta-Knowledge-Village] Re: Select Sum slow performance

2010-07-08 Thread mgk915
Yes, you do not want to change an existing index. Can you tell me what table and field you have the sum on? And tell me what fields you are using to group-by. - Maeve --- In Axapta-Knowledge-Village@yahoogroups.com, Donny Wu Doni.Wu@ wrote: Hi, Yes I have 2 index, currently

Re: [Axapta-Knowledge-Village] Re: Select Sum slow performance

2010-07-08 Thread Agus Riyadi
Hi Donny, If your actual problem is why it is slow in Ax compared to direct sql in the database, I suggest you use sql server profiler to capture whether there is difference between your direct sql and the sql generated by Ax kernel. Regards, Agus On Fri, Jul 9, 2010 at 7:55 AM, mgk915

Re: [Axapta-Knowledge-Village] Re: Select Sum slow performance

2010-07-08 Thread Donny Wu
HI @mgk915 : My table is InventSettlement and I sum field CostAmountAdjustment and using where in fields : ItemID, TransDate, Cancelled and SettleModel. If I only create the index for that where statement, my query still runnng slow compare with Query Analyzer but if I change that index into