Oracle leading vs. ordered hints
The "ordered" hint is extremely useful for cutting-down query parse time and ensuring proper table join order for static tables and queries.
- Good article on using the ordered hint
- The "leading" hint is ignored if the tables specified cannot be joined first in the order specified
- If you specify two or more conflicting LEADING hints – all of them are ignored
- The ORDERED hint overrides all LEADING hints
/* ORDERED */ Hint – Oracle joins tables
in the order in which they appear in the FROM
clause
- The optimizer normally chooses the order in which to join the tables, but it's time-consuming and wrong if you have bad CBO stats (especially histograms)
- You may want to specify the "ordered" hint if you know something about the number of rows selected from each table that the optimizer does not
The Oracle documentation notes the difference between the "ordered" and "leading" hints:
The LEADING hint causes Oracle to use
the specified table as the first table in
the join order.
If you specify two or more LEADING hints on
different tables, then all of them are
ignored. If you specify the ORDERED hint,
then it overrides all LEADING hints.
#####################################################
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/14377/viewspace-1060112/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle hints ? use_hash ? ordered ?Oracle
- Oracle HintsOracle
- oracle hint_leadingOracle
- Oracle Hints詳解Oracle
- oracle hints的使用Oracle
- Oracle Hints的用法Oracle
- oracle hints index格式OracleIndex
- Oracle使用提示(Hints)Oracle
- Oracle常見hint(leading)Oracle
- oracle hints用法總結Oracle
- Oracle Hints語句的用法Oracle
- oracle hints的那點事Oracle
- How to use hints in Oracle sql for performanceOracleSQLORM
- oracle效能優化之--hintsOracle優化
- oracle sql tunning all hintsOracleSQL
- Oracle AWR報告分析之–SQL ordered byOracleSQL
- Oracle透過AWR的SQL ordered by Gets和SQL ordered by Reads診斷問題OracleSQL
- Oracle for Linux vs. Oracle for NT(轉)OracleLinux
- PostgreSQL vs. Oracle 測試SQLOracle
- oracle 體系 & hints的用法總結(轉)Oracle
- oracle 使用leading, use_nl, rownum調優例子Oracle
- WITH AS and materialize hints
- Oracle優化案例-復現SQL ordered by Parse Calls(三十二)Oracle優化SQL
- Airflow vs. Luigi vs. Argo vs. MLFlow vs. KubeFlowAIUIGo
- [轉]oracle 使用leading, use_nl, rownum調優例子Oracle
- 【譯】Resource Hints
- PostgreSQL vs. Oracle DML 獨立壓測SQLOracle
- MVC vs. MVP vs. MVVMMVCMVPMVVM
- ordered_commit流程梳理MIT
- Using hints for PostgresqlSQL
- MySQL index hints 使用MySqlIndex
- LightDB 22.4 新特性之支援Oracle cardinality和ordered_predicates hintOracle
- HTTP Client Hints 介紹HTTPclient
- Common LISP Hints 中文Lisp
- Hints : DRIVING_SITE
- hints提示總結 zt
- git revert .vs. git reset .vs. git rebaseGit
- String.format VS. StrSubstitutor VS. NamedParameterJdbcTemplateORMJDBC