Structured Query Language (SQL) - Cultural View of Technology

Structured Query Language (SQL) - Cultural View of Technology Structured Query Language (SQL) - Cultural View of Technology

culturalview.com
from culturalview.com More from this publisher
23.10.2012 Views

FSQL 58 Fuzzy Constant Significance UNKNOWN Unknown value but the attribute is applicable UNDEFINED The attribute is not applicable or it is meaningless NULL Total ignorance: We know nothing about it $[a,b,c,d] Fuzzy trapezium (a

Hint (SQL) 59 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 as little memory as possible (even if the query will run slowly), or to use or not use an index even if the query optimizer would decide otherwise. 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 USE INDEX, FORCE INDEX or IGNORE INDEX keywords [1] . Oracle implements hints by using specially crafted comments in the query that begin with a + symbol, thus not influencing SQL compatibility [2] . See also • Query optimizer • Query plan References [1] MySQL 5.0 Reference Manual: 12.2.8.2 Index Hint Syntax (http://dev.mysql.com/doc/refman/5.0/en/index-hints.html) [2] Mike Ault: Oracle SQL Hints Tuning (http://www.dba-oracle.com/t_sql_hints_tuning.htm)

Hint (<strong>SQL</strong>) 59<br />

Hint (<strong>SQL</strong>)<br />

In various <strong>SQL</strong> implementations, a hint is an addition to the <strong>SQL</strong> standard that instructs the database engine on how<br />

to execute the query. For example, a hint may tell the engine to use as little memory as possible (even if the query<br />

will run slowly), or to use or not use an index even if the query optimizer would decide otherwise.<br />

Different database engines use different approaches in implementing hints. My<strong>SQL</strong> uses its own extension to the<br />

<strong>SQL</strong> standard, where a table name may be followed by USE INDEX, FORCE INDEX or IGNORE INDEX<br />

keywords [1] . Oracle implements hints by using specially crafted comments in the query that begin with a + symbol,<br />

thus not influencing <strong>SQL</strong> compatibility [2] .<br />

See also<br />

• <strong>Query</strong> optimizer<br />

• <strong>Query</strong> plan<br />

References<br />

[1] My<strong>SQL</strong> 5.0 Reference Manual: 12.2.8.2 Index Hint Syntax (http://dev.mysql.com/doc/refman/5.0/en/index-hints.html)<br />

[2] Mike Ault: Oracle <strong>SQL</strong> Hints Tuning (http://www.dba-oracle.com/t_sql_hints_tuning.htm)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!