Hint (SQL)
In various SQL implementations, a hint is an addition to the SQL standard that instructs the database engine on how to execute the query. For example, a hint may tell the engine to use or not to use an index.
Implementation
Different database engines use different approaches in implementing hints.- MySQL uses its own extension to the SQL standard, where a table name may be followed by, or keywords.
- Oracle implements hints by using specially-crafted comments in the query that begin with a symbol, thus not affecting SQL compatibility.
- EDB Postgres Advanced Server offers hints compatible with those of Oracle.
- Microsoft SQL Server offers hints via the keyword