0% found this document useful (0 votes)
887 views1 page

Inter and Intra Query Parallelism

Inter and Intra Query parallelism allows parallel execution of queries by decomposing them into parts that can work independently in parallel. Intra-operation parallelism parallelizes individual operations like sorting, scanning, and joining, while inter-query parallelism allows executing multiple queries simultaneously on different CPUs. Parallelism improves performance by utilizing more processors and disks to speed up long-running queries and transaction processing.

Uploaded by

Ajay Jha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
887 views1 page

Inter and Intra Query Parallelism

Inter and Intra Query parallelism allows parallel execution of queries by decomposing them into parts that can work independently in parallel. Intra-operation parallelism parallelizes individual operations like sorting, scanning, and joining, while inter-query parallelism allows executing multiple queries simultaneously on different CPUs. Parallelism improves performance by utilizing more processors and disks to speed up long-running queries and transaction processing.

Uploaded by

Ajay Jha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

the locks held by different transactions running on different processes.

Inter Intra-query parallelism:


query parallelism on shared disk architecture performs best when transactions Intra-query parallelism refers to the execution of a single query in a parallel
that execute in parallel do not accept the same data. Also, it is the easiest form of process on different CPUs using a shared-nothing paralleling architecture
technique. Application of parallelism decomposes the serial SQL, query into
parallelism in DBMS, and there is an increased transaction throughput.
lower-level operations such as scan, join, sort, and aggregation.These lower-level
• It is on Shared Disk Architecture . operations are executed concurrently, in parallel.
• Known as parallel transaction processing.
• Parallelism within a Query.
• Execution of multiple transaction by each CPU. • Execution of a single query in parallel on multiple processors and disks.
• different queries or transaction execute in parallel with one another. • Main Aim:-speeding up long-running queries.
• Main Aim:- sacling up transaction processing systems.
This uses two types of approaches:

• First approach–
In this approach, each CPU can execute the duplicate task against some
data portion.
• Second approach–
In this approach, the task can be divided into different sectors with each
CPU executing a distinct subtask.

Inter and Intra Query parallelism:-


Parallelism in a query allows us to parallel execution of multiple queries by
decomposing them into the parts that work in parallel. This can be achieved by
shared-nothing architecture. Parallelism is also used in fastening the process of a
query execution as more and more resources like processors and disks are
provided.

Inter-query parallelism:
In this parallelism, there is an execution of multiple transactions by each CPU. It is
called parallel transaction processing. DBMS uses transaction dispatching to carry
inter query parallelism. We can also use some different methods, like efficient
lock management. In this method, each query is run sequentially, which leads to
slowing down the running of long queries. In such cases, DBMS must understand

Inter and Intra Operation Parallelism:- • “ Partitioned Parallelism” Joins:-


• It is due to data being partitioned. Suppose we want to join two relations say A and B on the age attribute. We
Intra Operation Parallelism:- • The degree of parallelism is increased based on the large number of records assume that they are intially distributed across several disks in some way
• Each individual operation in a query is parallelized. in a table. that is not usefull for the join operation.that is, the initial partioning is not
• Example:- parallel sort, parallel search based on the join attribute. The basic idea for joining A and B in parallel is
• Single operation sorting is parallelized. to decompose the join into a collection of k smaller joins. We can
Parallelizing Individual Operations:- decompose the join by partitioning both A and B into a collection of K
Sorting:- logical partitions. By using the same partitioning function for both A and B,
we ensure that the union of k smaller joins computes the join of A and B;
A simple idea is to let each CPU sort the part of the relation that is on its
this idea is similar to intuition behind the partitioning phase of a sequential
local disk and to then merge these sorted sets of tuples. The degree of
hash join. Because A and B are initially distributed across several
parallelism is likely to belimited by the merging phase.
processors, the partitioning step can itself be done in parallel at these
processors.
A better idea is to redstribute all tuples in the relation using range
partitioning. For example, if we want to sort a collection of employee tuples
by salary ,salery values range from 10 to 210,and we have 20 processors, Pipeline parallelism:-
we could send all touples with salary values in the range 10 to 20 to the • Output record of one operation A are consumed by a second
processor,all in the range 21 to 30 to the second processor and so on. operation B without computing the first operation A.
• Like an assembly line,multiple operations are executing.
Each processor then sorts the tuples asigned to it, using some sequential • When multiple operations in a query that do not depend on one
sorting algorithum. For example,a processor can collect tuples until its another are executed in parallel that is independent parallelism.
memory full , then sort these tuples and write out a run, until all incoming • Each of these operations can execute in parallel.
tuples have been written to such sorted runs on the local disk. These runs • Sending result tuples it computes to the next operation even as it
can be merged toto create the sorted version. computing further results.

A particularly important application of parallel sorting is sorting th data


entries in tree-structured indexes. Sorting data entries can significantly
speed up the process of bulk-loading an index.

Inter Operation Parallelism:-


• Different operation in a query expressions are executed in parallel.
• Example:- Simultaneous sorting or searching.
• The operation sorting and searching are parallelized.

You might also like