AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 28.01.2011, 23:14   #1  
Blog bot is offline
Blog bot
Участник
 
25,643 / 848 (80) +++++++
Регистрация: 28.10.2006
doens.be: Index vs Index hint
Источник: http://www.doens.be/2010/10/index-vs-index-hint/
==============

This is a discussion I had with several colleagues. What is the difference between index and index hint and what do we use in our code?

There are a lot of misunderstandings about what these keywords actually  do. When you use the index keyword in a select statement the kernel will translate this to a order by command and the database optimizer will chose the best index to actually use. When you chose to use the index hint keyword in your select statement, Ax will force the database to use the chosen index.

Now what guideline should you use in writing your select statement? Index / Index hint or should you write nothing and let Ax decide what to do with the query. There are pro’s and con’s for all decisions.
Some people have no trust in the common sense of the developer and say ‘let the database optimizer chose’, it will know what’s best.
Personally I’m a big fan of using the index keyword in all your select statement because you it forces you to think about the indexes that are available on the table or if you should add a extra index to optimize the database-call for your SQL statement. In the end, the database optimizer can chose what the best index is to use.

If anyone has a opinion about this matter, don’t hesitate to comment.



Источник: http://www.doens.be/2010/10/index-vs-index-hint/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Rajdip's space: When using index (not using hint) in a select statement without 'GroupBy' or 'OrderBy' in what sequence do the records occur Blog bot DAX Blogs 0 20.04.2010 20:05
Rajdip's space: The mystery of "index" vs. "index hint" Blog bot DAX Blogs 0 20.04.2010 20:05
как указать сиквелу hint INDEX SHiSHok DAX: Программирование 9 14.11.2007 15:09
[axapta 4.0] - index и index hint Андре DAX: Программирование 24 26.01.2007 08:44
База на Oracle : убить index hint YaHooka DAX: Программирование 12 19.07.2005 11:13

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 20:33.