What are index hints?

3

I saw a comment from @RicardoPontual that mentioned density-based index hints

  

Your question seems pretty confusing .. it starts with a very basic thing   such as "how do I do a procedure on sql server", which is too simple for   find on Google and ends up talking about index hints based on   density , something very advanced, does not make much sense to me

This gave me some doubts, I know them:

  • What are hints of index?
  • What are density-based hints ?
  • Are there other types of hints ?
  • Would it be possible to add examples, regardless of the database?

obs¹: If you have something more on the subject, feel free to add

obs²: If I used some term incorrectly, you can correct it in the question

    
asked by anonymous 23.05.2018 / 03:37

1 answer

3

I do not know if the context is this, but hint (hint) is a way for the database programmer / user to tell how he wants the query to be executed , informing the index (s) to be used and how they will be used. Not all database systems have this functionality, but for this reason you can not put examples.

Generally it is not recommended to use unless you have a very strong relational algebra domain and are aware of existing data and know that your configuration will not change significantly to the point of harming rather than helping. Almost always the database will do a better service, should only use when clearly it is wrong and you can give a more appropriate tip. He is not required to follow. Without deep understanding of the database operation will do more harm than good.

It may be that this tip is indicating the data density for the index to be used, this is usually only needed when you need the performance right from the start, then the database can produce better statistics, or do not need to. But I do not know if any database allows this.

I do not know the context, it could be that I was talking about density like the index hash ( other ). Or a spreadsheet-based indexing method.

SQL Documentation Server .

    
23.05.2018 / 14:35