- Learn T-SQL Querying
- Pedro Lopes Pam Lahoud
- 328字
- 2021-06-24 14:38:17
Quick plan
This is phase one and is used if the plan found by the transaction processing phase is still more expensive than the internal threshold. This phase expands the search for a good-enough plan to cover rule-based join reordering and spools that may benefit moderately complex queries. To determine whether a good-enough plan has been found, as the Query Optimizer generates each potential query plan, it compares the cost of the plan that was just evaluated with the estimated cost of continuing to search for better plan alternatives. This effectively establishes a timeout so that we don't spend more time optimizing the query than we would spend executing the current plan. If a plan has been found with a cost lower than the cost threshold for the quick plan and lower than the timeout, optimization is stopped, and that good-enough plan is used. This avoids incurring additional compilation costs.
If the plan cost that the quick plan phase found is greater than the server configuration for the Cost Threshold for Parallelism and the server is a multiprocessor machine, then parallelism is considered. However, if the plan cost from the quick plan phase is less than the configured Cost Threshold for Parallelism, only serial plans are considered going forward.
Even if a parallel plan is produced, this doesn't mean the query plan will be executed on multiple processors. If existing processors are too busy to withstand running a query on multiple CPUs—technically meaning that there aren't enough available schedulers—then the plan will be executed on a single processor. If the MAXDOP server configuration is set to 1, parallelism is not considered at all in the optimization process.
- ArchiCAD 19:The Definitive Guide
- 基于C語言的程序設計
- Getting Started with MariaDB
- Mastering Salesforce CRM Administration
- VB語言程序設計
- Arduino &樂高創(chuàng)意機器人制作教程
- CompTIA Linux+ Certification Guide
- 運動控制系統(tǒng)
- 從零開始學C++
- 計算機組網技術
- MATLAB-Simulink系統(tǒng)仿真超級學習手冊
- Mastering Text Mining with R
- AVR單片機工程師是怎樣煉成的
- 基于人工免疫原理的檢測系統(tǒng)模型及其應用
- 常用傳感器技術及應用(第2版)