Hi For most queries, the answer is to use neither.
“Index Hint” overrides the SQL Query optimiser and forces the use of the specified index – which is ok if you’re sure that the optimiser is picking a bad query plan and that using “index hint” allows your query to run faster but most of the time the optimiser is better at picking the right index than you are so you should let it do its job. When you do need to tune the query you should consider other hints (e.g. forcenestedloop, etc) alongside “index hint” to get the most effective query plan for your data. I can’t think of a good reason to use “Index” at all. It simply ensures that the data is returned sorted in the index order which you can already achieve with the “Order By” clause with the important advantage that the sort order would not change if someone altered the index definition in some way. Regards Malcolm Burtt Touchstone Group People - Partnership - Solutions From: axapta-knowledge-vill...@yahoogroups.com [mailto:axapta-knowledge-vill...@yahoogroups.com] On Behalf Of pranam mukher Sent: 18 August 2010 12:17 To: axa knwoldge; dev ax Subject: [Axapta-Knowledge-Village] when to use Index and index hint hi I am aware of the fact that using index in select statement will include an order by clause in ur SQL query. i want to know, exactly when shud i use index and when to opt for index hint, in my Queries. Thanks Pradeep.SI [Non-text portions of this message have been removed]