Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can you expand on what you mean by index use "hints"? Or is this a feature I just haven't stumbled on yet?


As lmz mentioned, they inform the query planner that you'd prefer it to take a particular route to address your instructions where it might have a number of choices given your current table+index structure and data patterns (and has chosen a bad one of the options in the past).

I use the quotes around the word hint because it implies that it is a fairly informal pointer that the planner might choose to ignore where in reality they usually take it as an order and go that way without question (assuming that you know better than it might otherwise chose to do, or you would not have given the hint).


Telling / forcing the query planner to use a particular index in a query e.g.:

SQL Server: http://msdn.microsoft.com/en-us/library/ms187373.aspx MySQL: http://dev.mysql.com/doc/refman/5.6/en/index-hints.html




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: