《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 22 Parallel and Distributed Query Processing

Chapter 22:Parallel And Distributed Query Processing ■Overview ■Parallel Sort ■Parallel Join ■Other Operations Parallel Evaluation of Query Plans Query Processing on Shared Memory Query Optimization Distributed Query Processing Database System Concepts-7th Edition 22.2 @Silberschatz,Korth and Sudarshan
Database System Concepts - 7 22.2 ©Silberschatz, Korth and Sudarshan th Edition Chapter 22: Parallel And Distributed Query Processing ▪ Overview ▪ Parallel Sort ▪ Parallel Join ▪ Other Operations ▪ Parallel Evaluation of Query Plans ▪ Query Processing on Shared Memory ▪ Query Optimization ▪ Distributed Query Processing

Parallel Query Processing Different queries/transactions can be run in parallel with each other. Interquery parallelism Concurrency control takes care of conflicts in case of updates More on parallel transaction processing in Chapter 23 Focus in this chapter is on read-only queries Individual relational operations (e.g.,sort,join,aggregation)can be executed in parallel data can be partitioned and each processor can work independently on its own partition. Queries are expressed in high level language (SQL,translated to relational algebra) makes parallelization easier. Database System Concepts-7th Edition 22.3 ©Silberscha乜,Korth and Sudarshan
Database System Concepts - 7 22.3 ©Silberschatz, Korth and Sudarshan th Edition Parallel Query Processing ▪ Different queries/transactions can be run in parallel with each other. • Interquery parallelism • Concurrency control takes care of conflicts in case of updates • More on parallel transaction processing in Chapter 23 • Focus in this chapter is on read-only queries ▪ Individual relational operations (e.g., sort, join, aggregation) can be executed in parallel • data can be partitioned and each processor can work independently on its own partition. ▪ Queries are expressed in high level language (SQL, translated to relational algebra) • makes parallelization easier

Intraquery Parallelism Intraquery parallelism:execution of a single query in parallel on multiple processors/disks;important for speeding up long-running queries. Two complementary forms of intraquery parallelism: Intraoperation Parallelism-parallelize the execution of each individual operation in the query Supports high degree of parallelism Interoperation Parallelism-execute the different operations in a query expression in parallel. Limited degree of parallelism Database System Concepts-7th Edition 22.4 ©Silberscha乜,Korth and Sudarshan
Database System Concepts - 7 22.4 ©Silberschatz, Korth and Sudarshan th Edition Intraquery Parallelism ▪ Intraquery parallelism: execution of a single query in parallel on multiple processors/disks; important for speeding up long-running queries. ▪ Two complementary forms of intraquery parallelism: • Intraoperation Parallelism– parallelize the execution of each individual operation in the query ▪ Supports high degree of parallelism • Interoperation Parallelism– execute the different operations in a query expression in parallel. ▪ Limited degree of parallelism

Parallel Processing of Relational Operations Our discussion of parallel algorithms assumes: ·read-only queries shared-nothing architecture ·n nodes,N1,,Nn Each assumed to have disks and processors. Initial focus on parallelization to a shared-nothing node Parallel processing within a shared memory/shared disk node discussed later Shared-nothing architectures can be efficiently simulated on shared- memory and shared-disk systems. Algorithms for shared-nothing systems can thus be run on shared-memory and shared-disk systems. However,some optimizations may be possible. Database System Concepts-7th Edition 22.5 ©Silberscha乜,Korth and Sudarshan
Database System Concepts - 7 22.5 ©Silberschatz, Korth and Sudarshan th Edition Parallel Processing of Relational Operations ▪ Our discussion of parallel algorithms assumes: • read-only queries • shared-nothing architecture • n nodes, N1 , ..., Nn ▪ Each assumed to have disks and processors. • Initial focus on parallelization to a shared-nothing node ▪ Parallel processing within a shared memory/shared disk node discussed later • Shared-nothing architectures can be efficiently simulated on sharedmemory and shared-disk systems. ▪ Algorithms for shared-nothing systems can thus be run on shared-memory and shared-disk systems. ▪ However, some optimizations may be possible

Intraoperation Parallelism Database System Concepts -7th Edition 22.6 @Silberschatz,Korth and Sudarshan
Database System Concepts - 7 22.6 ©Silberschatz, Korth and Sudarshan th Edition Intraoperation Parallelism

Range Partitioning Redistribute using partitioning vector: 100,175,300,500,800 0-100) [100-175)[175-300)[300-500)[500-800)[800-1000) Database System Concepts-7th Edition 22.7 @Silberschatz,Korth and Sudarshan
Database System Concepts - 7 22.7 ©Silberschatz, Korth and Sudarshan th Edition Range Partitioning

Range-Partitioning Parallel Sort 1)Redistribute using partitioning vector: 100.175,300,500.800 0-100) [100-175) [175-300)[300-500)[500-800)[800-1000) 2)(External)sort locally at each node 3)Merge if output required at one node Database System Concepts-7th Edition 22.8 @Silberschatz,Korth and Sudarshan
Database System Concepts - 7 22.8 ©Silberschatz, Korth and Sudarshan th Edition Range-Partitioning Parallel Sort

Parallel Sort Local Sort Local Sort Merge r Local Sort Local Sort Merge Local Sort Local Sort Merge : Local Sort Local Sort Merge Im 1.Range Partition 2.Local Sort 1.Local Sort 2.Range Partition and Merge (a)Range Partitioning Sort (b)Parallel External Sort-Merge Database System Concepts-7th Edition 22.9 @Silberschatz,Korth and Sudarshan
Database System Concepts - 7 22.9 ©Silberschatz, Korth and Sudarshan th Edition Parallel Sort

Parallel Sort Range-Partitioning Sort ■ Choose nodes N,...,Nmm,where m n-1 to do sorting. Create range-partition vector with m-1 entries,on the sorting attributes Redistribute the relation using range partitioning Each node N sorts its partition of the relation locally. Example of data parallelism:each node executes same operation in parallel with other nodes,without any interaction with the others. Final merge operation is trivial:range-partitioning ensures that, if i<j,all key values in node Nare all less than all key values in N Database System Concepts-7th Edition 22.10 ©Silberscha乜,Korth and Sudarshan
Database System Concepts - 7 22.10 ©Silberschatz, Korth and Sudarshan th Edition Parallel Sort Range-Partitioning Sort ▪ Choose nodes N1 , ..., Nm, where m n -1 to do sorting. ▪ Create range-partition vector with m-1 entries, on the sorting attributes ▪ Redistribute the relation using range partitioning ▪ Each node Ni sorts its partition of the relation locally. • Example of data parallelism: each node executes same operation in parallel with other nodes, without any interaction with the others. ▪ Final merge operation is trivial: range-partitioning ensures that, if i < j, all key values in node Ni are all less than all key values in Nj

Parallel Sort (Cont.) Parallel External Sort-Merge Assume the relation has already been partitioned among nodes N1,...N (in whatever manner). Each node N locally sorts the data (using local disk as required) The sorted runs on each node are then merged in parallel: The sorted partitions at each node Ni are range-partitioned across the processors N1,...,N. Each node Ni performs a merge on the streams as they are received,to get a single sorted run. The sorted runs on nodes N1,...,N are concatenated to get the final result. Algorithm as described vulnerable to execution skew all nodes send to node 1,then all nodes send data to node 2, Can be modified so each node sends data to all other nodes in parallel (block at a time) Database System Concepts-7th Edition 22.11 ©Silberscha乜,Korth and Sudarshan
Database System Concepts - 7 22.11 ©Silberschatz, Korth and Sudarshan th Edition Parallel Sort (Cont.) Parallel External Sort-Merge ▪ Assume the relation has already been partitioned among nodes N1 , ..., Nn (in whatever manner). ▪ Each node Ni locally sorts the data (using local disk as required) ▪ The sorted runs on each node are then merged in parallel: • The sorted partitions at each node Ni are range-partitioned across the processors N1 , ..., Nn . • Each node Ni performs a merge on the streams as they are received, to get a single sorted run. • The sorted runs on nodes N1 , ..., Nn are concatenated to get the final result. ▪ Algorithm as described vulnerable to execution skew • all nodes send to node 1, then all nodes send data to node 2, … • Can be modified so each node sends data to all other nodes in parallel (block at a time)
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 21 Parallel and Distributed Storage.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 20 Database System Architectures.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 02 Intro to Relational Model.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 19 Recovery System.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 18 Concurrency Control.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 17 Transactions.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 16 Query Optimization.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 15 Query Processing.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 14 Indexing.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 13 Data Storage Structures.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 12 Physical Storage Systems.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 11 Data Analytics.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 10 Big Data.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 01 Introduction(Avi Silberschatz Henry F. Korth S. Sudarshan).pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第五版,PPT课件讲稿,英文版)Chapter 9 Object-Based Databases.ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第五版,PPT课件讲稿,英文版)Chapter 8 Application Design and Development.ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第五版,PPT课件讲稿,英文版)Chapter 7 Relational Database Design.ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第五版,PPT课件讲稿,英文版)Chapter 6 Entity-Relationship Model.ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第五版,PPT课件讲稿,英文版)Chapter 5 Other Relational Languages.ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第五版,PPT课件讲稿,英文版)Chapter 4 Advanced SQL.ppt
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 23 Parallel and Distributed Transaction Processing.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 24 Advanced Indexing.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 25 Advanced Application Development.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 26 Blockchain Databases.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 27 Formal-Relational Query Languages.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 28 Advanced Relational Database Design.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 29 Object-Based Databases.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 03 Introduction to SQL.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 30 XML.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 31 Information Retrieval.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 04 Intermediate SQL.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 05 Advanced SQL.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 06 Database Design Using the E-R Model.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 07 Normalization.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 08 Complex Data Types.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 09 Application Development.pptx
- 计算机科学与技术教学资源(参考文献)The generalized Cholesky factorization method for saddle point problems.pdf
- 计算机科学与技术教学资源(参考文献)Inverse updating and downdating for weighted linear least squares using M-invariant reflections.pdf
- 计算机科学与技术教学资源(参考文献)Analysis of peaks and plateaus in a Galerkin/minimal residual pair of methods.pdf
- 计算机科学与技术教学资源(参考文献)Perturbation analysis for the generalized Cholesky factorization.pdf