Abstractâ efficient evaluation of correlated sub queries in large systems received much attention by researches as it became crucial issue. Correlated SQL ...
A BRIEF OPTIMIZATION OF CORRELATED SQL QUERIES C. R. PATIL DEPT. OF COMPUTER ENGG. KKWIEER, NASHIK, MAHARASHTRA, INDIA Abstract— efficient evaluation of correlated sub queries in large systems received much attention by researches as it became crucial issue. Correlated SQL subqueries, in a relational database management system (RDBMS) can be efficiently evaluated by decorrelating them, by taking care of SQL count bug and avoid using of outer join operation which is very expensive. RDBMS query processor returns a tuple of null(s) from a scalar derived table when there is no tuple match found from a correlated subquery. It then uses COALESCE function which generates proper count value of zero from the null and maintains correlation level one. The query processor also performs a “pass-through” optimization instead of a join operation to improve efficiency.
Figure 1. Query Graph Model
Many systems require large and complex correlated subqueries It may cause severe performance degradations in centralisez, parallel and distributed database environments Follwing work is done on different envoronment and also have large scope to do future enhancement Parallel database: Decorrelation is key issue in this and Magic decorrelation algorithm can be beneficial Shared nothing database: localizing execution of subqueries and determining collocation of excution of subqueries in Parallel Database Distributed Database System: Automated Query Optimization method using both local and global parallel optimization Shared disk architecture: “Oracle’s parallel SQL execution engine” describes novel architecture and technique for optimizations for parallel SQL execution in the oracle 10g database There are many more query optimization algorithms proposed for distributed and parallel RDF engines
Keywords— Correlated SQL subqueries, outer join, optimization. OPTIMISATION OF CORRELATED QUEIRES Query Box Representation (QBR): Tool for graphical representation of SQL statements different QBR are used by a various types of optimizers QBR allows efficient rearrangement of SQL queries by rewriting it. "Query Graph Model" (QGM) is the popular QBR model Figure 1 shows the QGM for follwing SQL query SELECT DISTINCT a1. itemsno, a1.descr, a2. merchantno FROM inventory a1, quotations a2 WHERE a1. itemsno = a2. itemsno AND a1.descr=’XYZ’ AND a2.price > ALL (SELECT a3.price FROM quotations a3 WHERE a2.itemsno = a3. itemsno); Decorrelation: Eliminating a correlation is called decorrelation. Magic decorrelation algorithm is efficient one as it solves SQL “count bug” problem
RELATED WORK ON LARGE SYSTEMS
CONCLUSION Here it is a brief idea of correlated query optimization process and the importance of graphical QBR model during decorrelation. Discussed issues rose during decorrelation and how to take care of SQL “count bug” and “pass through” optimization process. Thrown the light on increasing trend towards complex query processing in a centralized, distributed as well as parallel databases and usefulness of decorrelation algorithm in this entire scenario, as to improve efficiency in query optimization is a vital issue in large systems.