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)
Generating preview...
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.
Description
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 summary
- Document name
- 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)
- School / Course
- Duke University · Big Data
- Content
- 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.
- Table of contents
- 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
- Pages
- 41 pages
- Uploaded by
- Uni24h
Frequently asked questions
Is this document free?
Yes. “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)” is free — just sign in and click Download to get the original file.
How many pages is this document?
The document has 41 pages, for the course Big Data. You can preview it online before downloading.
Can I preview before downloading?
Yes. You can preview this document right on this page with the online reader, then decide whether to download.
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)
Generating preview...
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 } {
Read full document
- Document name
- 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)
- School / Course
- Duke University · Big Data
- Content
- 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.
- Table of contents
- 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
- Pages
- 41 pages
- Uploaded by
- Uni24h
Comments (0)
No comments yet. Be the first!
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
Comments (0)
No comments yet. Be the first!