This document discusses using particle swarm optimization to generate query plans in a distributed database system. It notes that joins are an important operation but generating all possible query plans leads to exponential growth. Particle swarm optimization is proposed to produce low-cost query plans by modeling query planning as particles that track the best solutions. The approach breaks queries into local subqueries, executes them in parallel, and combines results to reduce data transfer and response times compared to alternative algorithms like genetic algorithms. The goal is to optimize query performance by selecting plans with minimum processing costs.
Query Plan Generation using Particle Swarm Optimization
1. Generation of Query Plan
using Particle Swarm
Optimization Algorithm
SUBMITTED BY-
AKSHAY JAIN
9911103421
2. Introduction
A database is a collection of data.
A database management system (DBMS) is a set of
software that are used to define, store, manipulate
and control the data in a database.
3. Problem Statement
Across the globe large number of queries are
generated. In order to process these queries
efficiently, optimal strategies are used.
Join operation is the most important operation in
database.
In distributed Relation database systems, there is
replication of data at multiple sites and every
relation has to answer a query.
4. This leads to data accessing from multiple sites
which increases the size of database which further
increases the number of joins.
This leads to exponential increase in query plans.
So distributed query plan generation technique
generates the best possible and the most cost-
effective option for query plan.
5. To produce the most cost effective query plan using
one of the soft computing techniques which are -
1. Particle Swarm Optimization
2. Ant Colony Algorithm
3. Genetic Algorithm
8. Genetic Algorithm
GA generates a population of chromosomes where each
chromosome represents a query plan.
The fitness value of each chromosome in the
population, using the fitness function, is evaluated.
The fitter individuals are then selected for crossover
and mutation.
GA explores the entire solution space of chromosomes.
9. Particle Swarm Optimization
Population based stochastic optimization
technique.
SCALABLE
FLEXIBLE
ROBUST
PSO uses a population of individuals, to search
feasible region of the function space. In this context,
the population is called swarm and the individuals
are called particles.
10. It uses number of particles that constitute a swarm. Each
particle keeps a track of its coordinates and the best solution it
has achieved so far is called pbest.
It also keeps track of neighbourhood particle and it’s best
value which is called gbest.
PSO accelerates each particle to pbest and gbest and find
best path and hence minimum cost.
11. Particle swarm optimization (PSO) is a computational
method that optimizes a problem by iteratively taking
particle's position and velocity and using mathematical
formulae.
This is expected to move the swarm toward the best
solutions.
Experimental comparisons of this algorithm with the GA
based distributed query plan generation algorithm shows
that for higher number of relations, the PSO based
algorithm is able to generate comparatively better
quality query plans.
14. Objectives Achieved
Generated the most effective query plan for a
distributed relational query using the concept that a
distributed query is broken down into local sub-queries
which are executed at their respective sites and then
the final integrated result is provided as the answer.
Reduced the the total query processing cost (TC) which
comprises of Total Processing Cost (TPC) and Total Site-
to-Site Communication Cost (TCC).