Query Parallelism

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 8

Query Parallelism

• In parallel database system to improve the


performance of the system, parallelism is used.
• It is achieved through query parallelism
• The transaction throughput is increased
execution of one or more queries
Forms of Query Parallelism
Interquery Parallelism

• “Parallelism among queries’"


• Different queries or transactions
are executed in parallel with one
another
• Main aim: scaling up transaction
processing systems
Intraquery Parallelism
• “Parallelism within query’
• Execution of a single query’
in parallel on multiple processors
and disks
• Main aim: speeding up
long-running queries
Intraquery Parallelism

Execution of a single query can be parallelized in


two ways:
Intraoperation parallelism Interoperation parallelism
 
Each individual operation in a query is parallelized Different operations in expressions are executed in
parallel
 

Example: parallel sort, parallel search Example: Simultaneous sorting or searching query
 

A single operation sorting is parallelized The operations sorting and searching are parallelized
 
Intraoperation parallelism
• “Partitioned parallelism”
• Get all machines working to
compute a given operation
(scan, sort, join)
• Parallelism due to the
data being partitioned
• The degree of
parallelism
is increased based on
the large number of
records in a table
conti…
Within a same query or transaction, different
operations are concurrently executing
Pipeline Parallelism Independent Parallelism
 
Output record of one operation A are consumed by a Multiple operations in a query that do not depend on one
second operation B without completing the first operation another are executed in parallel
A e.g. indexed nested loop join.

Like an assembly line, multiple operations are executing  


   
 
Does not provide high degree of parallelism. It is useful
Only useful for small number of processors with a lower degree of parallelism
   
Pipelined + Independent Parallelism

Inter-operator parallelism. Each operator may run concurrently on a different site (exploits pipelining)

A natural join of 4 relations r1,r2,r3 and r4.


P1 = temp 1 = r1xr2; P2 = temp2 = temp1xr3; P3
=result/output = temp2xr4

You might also like