You are right about the DataAreaId being added to the index by the kernel. I am 
not sure that you need to concern yourself about the order of the fields as 
suggested in the backend but you need to ensure that any query coming from AX 
should have the fields listed in the WHERE clause in the order in which they 
are listed in the index. In the case below, if there is an index with the 
SalesId and RecId listed in that order then you should ensure that all queries 
sent to the database, that will possible use this index, have the fields in the 
WHERE clause listed in the same order. 

CustPackingSlipJour :
          salesid asc,
          dataareaid asc,
          recid asc.

 
Varden Morris
Varalth Solutions Inc.  
693 Abbottsfield Road NW
Edmonton, Alberta T5W 4R4
Canada 
(780) 752-0406
www.varalth.com

CONFIDENTIALITY NOTICE 
 
This message and any attachments are confidential.  If you have received this 
transmission in error, please be advised that any disclosure, copying, 
distribution or action taken in reliance upon this communication is strictly 
prohibited.  If you have received this communication in error, please contact 
the sender immediately. Please note that any views or opinions presented in 
this email are solely those of the author and do not necessarily represent 
those of the company.  Finally, the recipient should check this email and any 
attachments for the presence of viruses. The company accepts no liability for 
any damage caused by any virus transmitted by this email.




________________________________
From: Agus Riyadi <agusa...@gmail.com>
To: axapta-knowledge-village <Axapta-Knowledge-Village@yahoogroups.com>
Sent: Wednesday, March 4, 2009 12:27:29 AM
Subject: [Axapta-Knowledge-Village] Create index with first column not 
dataareaid


Dear all,

Using sql server database engine tuning advisor, I got a recommendation to add 
new index with the following scheme :

CustPackingSlipJour :
          salesid asc,
          dataareaid asc,
          recid asc.

Is it possible to achieve that in Ax ? As far as I know Ax always add 
dataareaid column as the first column of any index created from AOT.

Thanks and best regards,

Agus




      

Reply via email to