0% found this document useful (0 votes)
15 views4 pages

Irjet V6i2217

The document provides an overview of query optimization techniques in database systems, emphasizing the importance of optimizing queries to improve database performance as data complexity increases. It discusses various objectives of query optimization, including maximizing throughput and minimizing resource usage, and summarizes several techniques such as predicate pushdown, early projections, and the use of indexes. The paper concludes by highlighting the necessity of query optimization for efficient database operations and the potential for further research in this area.
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)
15 views4 pages

Irjet V6i2217

The document provides an overview of query optimization techniques in database systems, emphasizing the importance of optimizing queries to improve database performance as data complexity increases. It discusses various objectives of query optimization, including maximizing throughput and minimizing resource usage, and summarizes several techniques such as predicate pushdown, early projections, and the use of indexes. The paper concludes by highlighting the necessity of query optimization for efficient database operations and the potential for further research in this area.
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/ 4

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 06 Issue: 02 | Feb 2019 www.irjet.net p-ISSN: 2395-0072

An Overview of Query Optimization Techniques in Database Systems


Pooja Wankhade1, Dr. Vaishali Deshmukh2
1Dept. Of Computer Sci. & Engg., PRMITR, Badnera, Maharashtra, India
2Prof. Dept. of Computer Sci. & Engg., PRMITR, Badnera, Maharashtra, India
---------------------------------------------------------------------***----------------------------------------------------------------------
Abstract:- Nowadays databases can store tremendous to query optimization techniques. Section 3 lists some of the
amount of information. At the beginning of database creation, optimization techniques in brief. Finally section 4 concludes
the scale of data related to applications is small, the load on the paper.
the database is light, so the performance of database system
may seem satisfied but followed by the increase in data, the 1.1 Background
process consumes more resources and the speed of database
system becomes slower. The amount of data keeps growing Query optimization is an important area of research
every second, queries keep on getting more and more complex in relational database management systems. In simple terms,
and database operations are still expected to work quickly. a query is a request for information from a database. It can
The database encounters performance degradation. At this be as simple as “return list of all cities in a country” or
stage, database performance becomes a major concern. This somewhat complex as “return the average age of all
initiates a need of query optimization. residents having income greater than 20LPA and residing in
metro cities of a country”. The result for the query is
This paper discusses about the importance, objectives and obtained by manipulating the database such that it yields the
different approaches to query optimization. In this paper, we requested information. This result can be obtained from a
try to summarize some of the helpful query optimization database by accessing it in various methods, using multiple
techniques focused on common query constructs. data-structures, and in different sequences. Each method
may require different processing time. The processing time
Key Words: Query optimization, Relational databases, may vary largely depending on the way used.
Database tuning, Group by, Joins, Nested sub-query,
Indexes A query plan is a sequence of steps used to manipulate data
in a database management system. There may be different
1. INTRODUCTION query plans for the same query. One query plan may involve
scanning the whole table to get the desired data while
Due to the huge growing applications, tremendous amount another may simple use index to directly fetch the requested
of data is generated every day. The size of the databases is record. Different query plans may give the same correct
increasing exponentially. Despite of the increasing data size, result but may require different processing time.
we expect that the database queries return answer in
minimum time. As the queries become complex, it becomes 1.2 Objectives
necessary to optimize them to arrive at the results quickly.
Otherwise, we would be spending most of our time to wait The objectives of query optimization are –
for the results only. Here query optimization proves to be of
great help.  Achieve maximum throughput in minimum response
time.
The simplest definition of query optimization is adopting
different techniques for reducing running time of database  Utilize minimum possible system resources to get
queries. Its objective is to increase the speed and efficiency desired result of a query
with which data is fetched/added from/to the database.
 Allow the system to process more queries in the same
Query optimization aims to allow us get the accurate result
amount of time reducing processing time by optimizing
in the smallest amount of time. Optimization has always
badly written queries
been and still is a very important topic in database systems.
 Reduce the amount of hardware wear and tear and
The goal of query optimization is to minimize the response
improve efficiency by consuming less memory and
time of queries by making the best use of our system
power.
resources. It is very important for large scale database
applications for efficient use of their system resources. 2. LITERATURE SURVEY
This paper is organized as follows. Section 1 discusses about Query optimization is a wide research area in database field.
the background and objectives of query optimization. A lot of research has been done and so much work is still
Section 2 of literature survey summarizes the work related

© 2019, IRJET | Impact Factor value: 7.211 | ISO 9001:2008 Certified Journal | Page 1116
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 06 Issue: 02 | Feb 2019 www.irjet.net p-ISSN: 2395-0072

going on related to this topic. In following section, we try to The algorithms are based on alternative ways of interpreting
summarize some of optimization techniques focused on the operations of queries which involve the four types of
group-by, joins and nested sub-queries, Having clause, nesting, and may often improve the performance of nested
indexes, etc. queries by orders of magnitude.

Abhijit Banubakode, Virandra Dakhode, “Comparative He analyzes the fundamental structure of an SQL-like, block-
Analysis of Query Optimization in the Object-Oriented structured data language and how implementation suffers
Database & Relational Databases Using Clauses[1]” from the use of the inefficient nested-iteration method. He
presented comparative analysis of query optimization for shows that the algorithm improves the performance of
relational databases and object oriented database based on nested queries drastically. He also combines these
cost, cardinality and no of bytes. They focus on queries using algorithms into a coherent strategy for completely
where, group-by and having clauses. In this paper, they processing a general query of arbitrary complexity.
review the optimization technique, establishes the
experimental setup and explains the query evaluation Fazal Mithani, Sahista Machchhar and Fernaz Jasdanwala, “A
aspects. Their paper concludes that first if the group-by novel approach for SQL query optimization[4]” proposed a
clause applied before conditional statement then there is model to convert the input user SQL query into an optimized
significant cost reduction. The logic behind this optimization SQL query and aims to give assurance of reduced query
is based on the fact that a group-by reduces the cardinality of execution time. They propose a scheme/approach to take an
a relation, therefore if group by is evaluated early, it could input query and provide a detailed plan called a Query
reduce the cost of subsequent joins. Execution Plan (QEP) which includes related missing
indexes, Join ordering, multitable joins and performance
They explained this using an example query that computes issues with LIKE operator.
count of bank branches located in a particular city and total
count of branches in each city. In normal approach where Their process of query optimization for datasets is described
group-by is applied after condition i.e. first check the as the following. First of all input query need to be run & full
condition and then group on branch city, search time is more scan of dataset has to be performed. Then get the
and CPU cost is high. The optimization technique is to group information about database schema, number of joins,
on branch city first and then check the condition. This way if missing indexes, redundant usage of tables, etc. From this
group-by is applied before condition, search time and CPU information, find the alternate way to replace the method of
cost are proven to reduce significantly. query processing as per proposed scheme which identifies
the syntax, constraint information, join aggregation and
Weipeng P. Yan, Per Ake Larson, “Performing Group by freeze some of data. Then by using all these rewrite the input
before join[2]” proposed a new strategy for processing SQL query. Finally run the query and compare it with the input
queries containing group-by namely pushing the group-by query. It gives surety about performance by an optimized
operation past one or more joins. They consider sql queries execution. This proposed schema represents how the simple
containing joins and group by. They say that even though the query is going to be converted in to optimized query in very
standard way of evaluating this type of queries is to perform accurate proper way with minimum amount of time and it
all the join first and then the group by operation, it may be will reduce the cost of execution and increase the speed of
possible to perform group by early i.e. to push group by past retrieval of data.
one or more joins.
D.Saisanguansat and P.Jeatrakul,” Optimization Techniques
According to them, early grouping may reduce the query for PL/SQL [5]” presented optimization yechniques for
processing cost by reducing the amount of data participating PL/SQL like using index, out number technique, reducing
in joins. They stated necessary and sufficient conditions for sub-queries, etc. Using index technique is similar to the use
using their proposed transformation and also stated an of indexes in a book. Outnumber technique is to reuse the
algorithm for deciding whether a group by can pushed past a data values instead of repetitive calculation. Reducing sub-
join. They also noted some tradeoffs of this transformation queries is to reduce the number of sub-queries to minimum
and pointed out that reverse of the transformation is also possible count. They also presented combination technique
possible and can be beneficial sometimes. They showed that which involves combining multiple optimization techniques.
their strategy may result in significant savings in query
processing time. They assumed that queries were not They presented ten such optimization techniques and
containing ‘Having’ clause. showed that each technique can improve the performance.
Their results show that these techniques increase the
Won Kim, “On Optimizing an SQL-like Nested Query[3]” efficiency by at least 9.88% to 732.25%. Using index
suggest to transform the nested queries to equivalent, non- techniques was proven to be the best effective one.
nested queries that existing optimizers are designed to
process more efficiently. He develops algorithms which
transform nested queries to equivalent, non nested queries.

© 2019, IRJET | Impact Factor value: 7.211 | ISO 9001:2008 Certified Journal | Page 1117
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 06 Issue: 02 | Feb 2019 www.irjet.net p-ISSN: 2395-0072

Jean Habimana, “Query Optimization Techniques - Tips For 4. CONCLUSIONS


Writing Efficient And Faster SQL Queries[6]” proposed
various general techniques that we can use to try to optimize Performing database operations in specific time frame is
our database queries. This paper does not focus on, in- depth important for any application today. There exists multiple
analysis of database but simple query tuning tips & tricks ways of writing a query to achieve an equivalent operation
which can be applied to gain immediate performance gain. on dataset. However, there can be massive difference in
performance in executing these operations depending on the
He suggested various tips like Using Column Names Instead method used. Queries scripted in non optimal ways can be
of * in a SELECT statement, avoiding including a HAVING improved to perform better. A query written in optimal way
clause in SELECT statements, Un-nesting sub queries, gives the results in the desired time and makes the
avoiding using OR in join conditions, use of UNION ALL in application run faster.
place of UNION, avoiding functions on the right hand side of
the operator, removing any redundant mathematics, etc. Query optimization is a research area where there is lot of
scope of development. It’s necessary for any organization to
3. SOME QUERY OPTIMIZATION TECHNIQUES utilize the resources and be at its peak performance. Query
optimization helps to achieve these goals.
 Predicate pushdown
This paper summarizes the problem, need and importance of
-Perform predicate filtering before join to reduce size of query optimization. In this paper, we discussed about
join objectives and approach to query optimization. This paper
gives an overview of some of the helpful query optimization
 Perform projections early to create smaller tuples and techniques related to common query constructs like group
reduce intermediate results. by, joins, nested sub-queries, etc.
-Keep only required join attributes REFERENCES
 Rewrite to un-nest sub queries and/or flatten queries [1] Abhijit Banubakode, Virandra Dakhode, “Comparative
Analysis of Query Optimization in the Object-Oriented
 Decompose nested query and store result in sub table Database & Relational Databases Using Clauses,
International Journal of Advanced Research in Computer
 Try to push group-by past one or more join operations Science and Software Engineering Dec.2014.
-Reduce the query processing cost by reducing the
[2] Weipeng P. Yan, Per Ake Larson, “Performing Group by
amount of data participating in joins
before join”, Proceedings of 1994 IEEE 10th International
 use LOAD DATA Conference on Data Engineering.

-Can be used to load table from text file, this is usually [3] Won Kim, “On Optimizing an SQL-like Nested Query”,
20 times faster than using INSERT statements. ACM Transactions on Database Systems, Vol. 7, No. 3,
September 1982.
 Use single INSERT statement with as much possible
multiple values rather than multiple single row INSERTS [4] Fazal Mithani, Sahista Machchhar and Fernaz Jasdanwala,
“A novel approach for SQL query optimization”, 2016 IEEE
-Can be used for inserting many rows from the same International Conference on Computational Intelligence and
client at the same time Computing Research.

 Try to use column names instead of * in SELECT [5] D.Saisanguansat, P.Jeatrakul, “Optimization Techniques
statements for PL/SQL”, 14th International Conference on ICT and
Knowledge Engineering (ICT&KE) 2016.
 Remove unnecessary tables from query joins
[6] Jean Habimana, “Query Optimization Techniques - Tips
 Use WHERE to limit the size of result tables that are For Writing Efficient And Faster SQL Queries”, International
created with joins. Journal Of Scientific & Technology Research Volume 4, Issue
10, October 2015 ISSN 2277-8616 22.
 Use LIMIT to sample Query Results
[7] Vamsi Krishna Myalapalli, ASN Chakravarthy and
 Drop unused Indexes KeesariPrathap Reddy “Accelerating SQL Queries by
Unraveling Performance Bottlenecks in DBMS Engine”, 2015

© 2019, IRJET | Impact Factor value: 7.211 | ISO 9001:2008 Certified Journal | Page 1118
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 06 Issue: 02 | Feb 2019 www.irjet.net p-ISSN: 2395-0072

International Conference on Energy Systems and


Applications (ICESA 2015).

[8] Vamsi Krishna Myalapalli and Pradeep Raj Savarapu,


“High Performance SQL”, 11th IEEE International Conference
on Emerging Trends in Innovation and Technology,
December 2014, Pune, India.

[9] Matthias Jarke, Jurgen Koch, “Query Optimization in


Database Systems”, ACM Computing Surveys (CSUR) Volume
16 Issue 2, June 1984.

[10] Surajit Chaudhari, “An Overview of Query Optimization


in Relational Systems”, PODS '98 Proceedings of the
seventeenth ACM SIGACT-SIGMOD-SIGART symposium on
Principles of database systems.

[11] Vamsi Krishna Myalapalli and Muddu Butchi Shiva, “An


Appraisal to Optimize SQL Queries”, IEEE International
Conference on Pervasive Computing, January 2015, Pune,
India.

[12] Vamsi Krishna Myalapalli, Bhupati Lohith Ravi Teja, “


High Performance PL/SQL Programming”, IEEE
International Conference on Pervasive Computing, pp . 1 – 6,
8 -10 Jan.2015.

[13] K. Kiran Kumar, T.M. Santhi Sri and Voruganti Vamshi


priya, “Introduction to Techniques of Query Processing and
Optimization” , IJIRAE, vol. no. 2, pp.40-45 march 2015.

[14] P.Gulutzan and T.Pelzer, “SQL Performance Tuning”,


(Addison-Wesley,2003. 2003)

[15] S.Feuerstein, B.Pribyl, “Oracle PL/SQL Programming”


(O'Reilly Media, 2005. 2005)

[16]Optimizing INSERT Statements


https://dev.mysql.com/doc/refman/8.0/en/insert-
optimization.html

© 2019, IRJET | Impact Factor value: 7.211 | ISO 9001:2008 Certified Journal | Page 1119

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy