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)
Génération de l'aperçu...
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 } {
Résumé IA
- Nom du document
- 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)
- École / Cours
- Duke University · Big Data
- Contenu
- 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 des matières
- 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
- Téléversé par
- Uni24h
Foire aux questions
Ce document est-il gratuit ?
Oui. « 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) » est gratuit — il suffit de vous connecter et de cliquer sur Télécharger pour obtenir le fichier original.
Combien de pages compte ce document ?
Le document contient 41 pages, pour le cours Big Data. Vous pouvez le prévisualiser en ligne avant de le télécharger.
Puis-je prévisualiser avant de télécharger ?
Oui. Vous pouvez prévisualiser ce document directement sur cette page avec le lecteur en ligne, puis décider de le télécharger ou non.
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)
Génération de l'aperçu...
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 } {
Lire le document entier
- Nom du document
- 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)
- École / Cours
- Duke University · Big Data
- Contenu
- 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 des matières
- 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
- Téléversé par
- Uni24h
Commentaires (0)
Aucun commentaire pour le moment. Soyez le premier !
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
Commentaires (0)
Aucun commentaire pour le moment. Soyez le premier !