Misplaced Pages

Hint (SQL): Difference between revisions

Article snapshot taken from[REDACTED] with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editNext edit →Content deleted Content addedVisualWikitext
Revision as of 08:04, 11 July 2013 edit213.55.110.88 (talk) See also← Previous edit Revision as of 20:30, 19 August 2013 edit undoMidom (talk | contribs)250 editsm Reverted edits by 213.55.110.88 (talk) to last version by 12.34.246.72Next edit →
Line 8: Line 8:
* Postgres Plus® Advanced Server (a proprietary version of ] from ]) offers hints compatible with those of Oracle.<ref></ref><ref></ref> * Postgres Plus® Advanced Server (a proprietary version of ] from ]) offers hints compatible with those of Oracle.<ref></ref><ref></ref>


==See also==
<?xml version="1.0" ?>
* ]
<w3resource>
* ]
<design>
html
xhtml
css
svg
xml
</design>
<programming>
php
mysql
</programming>
</w3resource>


==References== ==References==

Revision as of 20:30, 19 August 2013

In database query operations, various SQL implementations use hints as additions to the SQL standard that instruct 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 to use an index (even if the query optimizer would decide otherwise).

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 USE INDEX, FORCE INDEX or IGNORE INDEX keywords.
  • Oracle implements hints by using specially-crafted comments in the query that begin with a + symbol, thus not affecting SQL compatibility.
  • Postgres Plus® Advanced Server (a proprietary version of PostgreSQL from EnterpriseDB) offers hints compatible with those of Oracle.

See also

References

  1. MySQL 5.5 Reference Manual: 12.2.9.3 Index Hint Syntax
  2. Mike Ault: Oracle SQL Hints Tuning
  3. Postgres Plus Advanced Server Performance and Scalability Guide: Query Optimization Hints
  4. Postgres Plus Advanced Server Oracle Compatibility Developer's Guide: Optimizer Hints


Stub icon

This database-related article is a stub. You can help Misplaced Pages by expanding it.

Categories:
Hint (SQL): Difference between revisions Add topic