qp opt (08) (Tối ưu hóa truy vấn trong hệ thống dữ liệu chuyên sâu) (Tiếng Anh)
正在生成预览...
Slide bài giảng về tối ưu hóa truy vấn trong hệ thống tính toán dữ liệu chuyên sâu, bao gồm các khái niệm về mô hình chi phí, thuật toán Selinger, và các chiến lược tối ưu hóa.
描述
Data-intensive Computing Systems Query Optimization (Costbased optimization) Shivnath Babu Query Optimization Problem Pick the best plan from the space of physical plans Cost-Based Optimization Prune the space of plans using heuristics Estimate cost for remaining plans Be smart about how you iterate through plans Pick the plan with least cost Focus on queries with joins Heuristics for pruning plan space Predicates as early as possible Avoid plans with cross products Only left-deep join trees Physical Plan Selection Logical Query Plan P1 P2 …. Pn Physical plans C1 C2 …. Cn Costs Pick minimum cost one Review of Notation T (R) : Number of tuples in R B (R) : Number of blocks in R Simple Cost Model Cost (R S) = T(R) + T(S) All other operators have 0 cost Note: The simple cost model used for illustration only Cost Model Example X T(X) + T(T) T T(R) + T(S) R S Total Cost: T(R) + T(S) + T(T) + T(X) Selinger Algorithm Dynamic Programming based Dynamic Programming: General algorithmic paradigm Exploits “principle of optimality” Useful reading: Chapter 16, Introduction to Algorithms, Cormen, Leiserson, Rivest Principle of Optimality Optimal for “whole” made up from optimal for “parts” Principle of Optimality Query: R1 R2 R3 R4 R5 Optimal Plan: R5 R1 R4 R3 R2 Principle of Optimality Query: R1 R2 R3 R4 R5 Optimal Plan: R5 R1 R4 R3 R2 Optimal plan for joining R3, R2, R4, R1 Principle of Optimality Query: R1 R2 R3 R4 R5 Optimal Plan: R5 R1 R4 R3 R2 Optimal plan for joining R3, R2, R4 Exploiting Principle of Optimality Query: R1 R2 … Rn R1 R2 R3 Optimal for joining R1, R2, R3 R2 R3 R1 Sub-Optimal for joining R1, R2, R3 Exploiting Principle of Optimality Ri Rj R2 R3 Sub-Optimal for joining R1,…,Rn R1 A sub-optimal sub-plan cannot lead to an optimal plan Selinger Algorithm: Query: R1 R2 R3 Progress of algorithm { R1, R2, R3, R4 } { R1, R2, R3 } { R1, R2, R4 } {
AI 摘要
- 文档名称
- qp opt (08) (Tối ưu hóa truy vấn trong hệ thống dữ liệu chuyên sâu) (Tiếng Anh)
- 学校 / 课程
- Duke University · Big Data
- 内容
- Tài liệu này giải thích cách tối ưu hóa truy vấn trong hệ thống dữ liệu bằng cách sử dụng tối ưu hóa dựa trên chi phí và thuật toán Selinger. Nó bao gồm các mô hình chi phí từ đơn giản đến phức tạp để chọn kế hoạch truy vấn hiệu quả nhất.
- 目录
- Query Optimization Problem
- Cost-Based Optimization
- Heuristics for pruning plan space
- Physical Plan Selection
- Review of Notation
- Simple Cost Model
- Cost Model Example
- Selinger Algorithm
- Principle of Optimality
- Exploiting Principle of Optimality
- Selinger Algorithm:
- Notation
- Selinger Algorithm:
- Selinger Algorithm:
- Selinger Algorithm:
- More Complex Cost Model
- Cost of Table Scan
- Cost of Clustered Index Scan
- Cost of Clustered Index Scan
- Cost of Non-Clustered Index Scan
- Cost of Non-Clustered Index Scan
- Cost of Tuple-Based NLJ
- Cost of Sort-Merge Join
- Cost of Sort-Merge Join
- 页数
- 41 页
- 上传者
- Uni24h
常见问题
此文档免费吗?
是的。“qp opt (08) (Tối ưu hóa truy vấn trong hệ thống dữ liệu chuyên sâu) (Tiếng Anh)”是免费的 — 只需登录并点击“下载”即可获取原始文件。
这份文档有多少页?
该文档共有 41 页,适用于课程 Big Data。您可以在下载前进行在线预览。
我可以在下载前预览吗?
是的。您可以通过在线阅读器直接在本页面预览此文档,然后再决定是否下载。
qp opt (08) (Tối ưu hóa truy vấn trong hệ thống dữ liệu chuyên sâu) (Tiếng Anh)
正在生成预览...
Data-intensive Computing Systems Query Optimization (Costbased optimization) Shivnath Babu Query Optimization Problem Pick the best plan from the space of physical plans Cost-Based Optimization Prune the space of plans using heuristics Estimate cost for remaining plans Be smart about how you iterate through plans Pick the plan with least cost Focus on queries with joins Heuristics for pruning plan space Predicates as early as possible Avoid plans with cross products Only left-deep join trees Physical Plan Selection Logical Query Plan P1 P2 …. Pn Physical plans C1 C2 …. Cn Costs Pick minimum cost one Review of Notation T (R) : Number of tuples in R B (R) : Number of blocks in R Simple Cost Model Cost (R S) = T(R) + T(S) All other operators have 0 cost Note: The simple cost model used for illustration only Cost Model Example X T(X) + T(T) T T(R) + T(S) R S Total Cost: T(R) + T(S) + T(T) + T(X) Selinger Algorithm Dynamic Programming based Dynamic Programming: General algorithmic paradigm Exploits “principle of optimality” Useful reading: Chapter 16, Introduction to Algorithms, Cormen, Leiserson, Rivest Principle of Optimality Optimal for “whole” made up from optimal for “parts” Principle of Optimality Query: R1 R2 R3 R4 R5 Optimal Plan: R5 R1 R4 R3 R2 Principle of Optimality Query: R1 R2 R3 R4 R5 Optimal Plan: R5 R1 R4 R3 R2 Optimal plan for joining R3, R2, R4, R1 Principle of Optimality Query: R1 R2 R3 R4 R5 Optimal Plan: R5 R1 R4 R3 R2 Optimal plan for joining R3, R2, R4 Exploiting Principle of Optimality Query: R1 R2 … Rn R1 R2 R3 Optimal for joining R1, R2, R3 R2 R3 R1 Sub-Optimal for joining R1, R2, R3 Exploiting Principle of Optimality Ri Rj R2 R3 Sub-Optimal for joining R1,…,Rn R1 A sub-optimal sub-plan cannot lead to an optimal plan Selinger Algorithm: Query: R1 R2 R3 Progress of algorithm { R1, R2, R3, R4 } { R1, R2, R3 } { R1, R2, R4 } {
阅读全文
- 文档名称
- qp opt (08) (Tối ưu hóa truy vấn trong hệ thống dữ liệu chuyên sâu) (Tiếng Anh)
- 学校 / 课程
- Duke University · Big Data
- 内容
- Tài liệu này giải thích cách tối ưu hóa truy vấn trong hệ thống dữ liệu bằng cách sử dụng tối ưu hóa dựa trên chi phí và thuật toán Selinger. Nó bao gồm các mô hình chi phí từ đơn giản đến phức tạp để chọn kế hoạch truy vấn hiệu quả nhất.
- 目录
- Query Optimization Problem
- Cost-Based Optimization
- Heuristics for pruning plan space
- Physical Plan Selection
- Review of Notation
- Simple Cost Model
- Cost Model Example
- Selinger Algorithm
- Principle of Optimality
- Exploiting Principle of Optimality
- Selinger Algorithm:
- Notation
- Selinger Algorithm:
- Selinger Algorithm:
- Selinger Algorithm:
- More Complex Cost Model
- Cost of Table Scan
- Cost of Clustered Index Scan
- Cost of Clustered Index Scan
- Cost of Non-Clustered Index Scan
- Cost of Non-Clustered Index Scan
- Cost of Tuple-Based NLJ
- Cost of Sort-Merge Join
- Cost of Sort-Merge Join
- 页数
- 41 页
- 上传者
- Uni24h
评论 (0)
暂无评论。快来抢沙发吧!
Neumann (mối quan hệ giữa Exascale Computing và Big Data) - Philipp Neumann
Tính toán trong bộ nhớ với Spark - Julian M. Kunkel
Intro to Mapreduce (02) (Giới thiệu về MapReduce và Hadoop) (Tiếng Anh)
GPUs (04) (Xử lý song song và bộ xử lý đồ họa)
Neo4j (08) (Xử lý đồ thị với Neo4j) - BigData Analytics - Julian M. Kunkel
Chương 7.Cơ học lượng tử - Vật lý đại cương 3 - TS.Nguyễn Thị Trang
Chương 6.Quang học lượng tử - Vật lý đại cương 3 - TS.Nguyễn Thị Trang
Chương 5.Thuyết tương đối - Vật lý đại cương 3 - TS.Nguyễn Thị Trang
Chương 4. Tán xạ ánh sáng - Vật lý đại cương 3 - TS.Nguyễn Thị Trang
Chương 3.Phân cực ánh sáng - Vật lý đại cương 3 - TS.Nguyễn Thị Trang
评论 (0)
暂无评论。快来抢沙发吧!