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優化案例-復現SQL ordered by Parse Calls(三十二)Oracle優化SQL
- WITH AS and materialize hints
- LightDB 22.4 新特性之支援Oracle cardinality和ordered_predicates hintOracle
- Using hints for PostgresqlSQL
- 【譯】Resource Hints
- Airflow vs. Luigi vs. Argo vs. MLFlow vs. KubeFlowAIUIGo
- 利用hints控制outline
- ordered_commit流程梳理MIT
- Extended Window Manager Hints(1)
- HashSet vs. TreeSet vs. LinkedHashSet
- Pycharm,Python 3 與 Type HintsPyCharmPython
- Python -型別提示 Type HintsPython型別
- 搞懂:資料科學vs.機器學習vs.資料分析vs.商業分析資料科學機器學習
- Python Type Hints 從入門到實踐Python
- Ansible vs. TerraformORM
- [20181017]ORA-01873 the leading precision of the interval is too small.txt
- “getfacl: Removing leading '/' from absolute path names”解決辦法REM
- Navigating Kubernetes Certification: CKAD vs. CKA vs. CKS, Including KCNA and KCSA
- leetcode.5601. 設計有序流(design-an-ordered-stream)LeetCode
- 【譯】GraphQL vs. RESTREST
- Spring WebClient vs. RestTemplateSpringWebclientREST
- Quarkus vs. SpringBoot - RedditSpring Boot
- 大資料檔案格式比較:AVRO vs. PARQUET vs. ORC大資料VR
- Redis vs. MongoDB比較RedisMongoDB
- 柏拉圖洞穴寓言 vs. AI表徵假說 vs. 表觀遺傳AI
- 幽默meme:如何提問題 Vs. 樂觀答題 Vs. 悲觀答題
- Ruby on Rails Mountable vs. Full EngineAI
- 模板 vs. 硬編碼 HTMLHTML
- Linux vs. Unix:有什麼不同?Linux
- 軟連結 vs. 硬連結
- 執行新增和修改操作報錯connection is read-only. Queries leading to data modification are not allowed
- Apple M1 vs. M1 Pro vs. M1 Max:Apple 的新晶片有多快?APP晶片
- 傳統量化策略 VS. AI量化策略AI
- machine learning model(algorithm model) .vs. statistical modelMacGo
- [譯] React Native vs. Cordova、PhoneGap、Ionic,等等React Native
- DevOps vs. Agile有什麼共同點?dev
- Service Mesh框架對比:Linkerd vs. Istio框架
- 幽默:網管 vs. 程式設計師程式設計師
- 儲存過程vs.函式QM儲存過程函式