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.
Đang tạo bản xem trước...
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 } {
… Tải file gốc để đọc toàn bộ tài liệu.
- Tên tài liệu
- 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)
- Trường / Môn
- Duke University · Big Data
- Nội dung
- 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.
- Mục lục
- 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
- Doc.pages
- 41 trang
- Người đăng
- Giang Le
Câu hỏi thường gặp
Tài liệu này có miễn phí không?
Có. “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)” miễn phí — bạn chỉ cần đăng nhập rồi bấm Tải xuống để lấy file gốc.
Tài liệu dài bao nhiêu trang?
Tài liệu gồm 41 trang, thuộc môn Big Data. Bạn có thể xem trước online trước khi tải.
Tôi có thể xem trước trước khi tải không?
Có. Bạn xem trước tài liệu ngay trên trang này bằng trình đọc online, rồi quyết định tải về.

Bình luận (0)
Chưa có bình luận nào. Hãy là người đầu tiên!