Correlated Subqueries

14,000,000 Leading Edge Experts on the ideXlab platform

Scan Science and Technology

Contact Leading Edge Experts & Companies

Scan Science and Technology

Contact Leading Edge Experts & Companies

The Experts below are selected from a list of 120 Experts worldwide ranked by ideXlab platform

T.y.c. Leung - One of the best experts on this subject based on the ideXlab platform.

  • complex query decorrelation
    International Conference on Data Engineering, 1996
    Co-Authors: Praveen Seshadri, Hamid Pirahesh, T.y.c. Leung
    Abstract:

    Complex queries used in decision support applications use multiple Correlated Subqueries and table expressions, possibly across several levels of nesting. It is usually inefficient to directly execute a Correlated query; consequently, algorithms have been proposed to decorrelate the query, i.e. to eliminate the correlation by rewriting the query. This paper explains the issues involved in decorrelation, and surveys existing algorithms. It presents an efficient and flexible algorithm called magic decorrelation which is superior to existing algorithms both in terms of the generality of application, and the efficiency of the rewritten query. The algorithm is described in the context of its implementation in the Starburst Extensible Database System, and its performance is compared with other decorrelation techniques. The paper also explains why magic decorrelation is not merely applicable, but crucial in a parallel database system.

  • ICDE - Complex query decorrelation
    Proceedings of the Twelfth International Conference on Data Engineering, 1
    Co-Authors: Praveen Seshadri, Hamid Pirahesh, T.y.c. Leung
    Abstract:

    Complex queries used in decision support applications use multiple Correlated Subqueries and table expressions, possibly across several levels of nesting. It is usually inefficient to directly execute a Correlated query; consequently, algorithms have been proposed to decorrelate the query, i.e. to eliminate the correlation by rewriting the query. This paper explains the issues involved in decorrelation, and surveys existing algorithms. It presents an efficient and flexible algorithm called magic decorrelation which is superior to existing algorithms both in terms of the generality of application, and the efficiency of the rewritten query. The algorithm is described in the context of its implementation in the Starburst Extensible Database System, and its performance is compared with other decorrelation techniques. The paper also explains why magic decorrelation is not merely applicable, but crucial in a parallel database system.

Dan Suciu - One of the best experts on this subject based on the ideXlab platform.

  • PLDI - HoTTSQL: proving query rewrites with univalent SQL semantics
    Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation, 2017
    Co-Authors: Shumo Chu, Konstantin Weitz, Alvin Cheung, Dan Suciu
    Abstract:

    Every database system contains a query optimizer that performs query rewrites. Unfortunately, developing query optimizers remains a highly challenging task. Part of the challenges comes from the intricacies and rich features of query languages, which makes reasoning about rewrite rules difficult. In this paper, we propose a machine-checkable denotational semantics for SQL, the de facto language for relational database, for rigorously validating rewrite rules. Unlike previously proposed semantics that are either non-mechanized or only cover a small amount of SQL language features, our semantics covers all major features of SQL, including bags, Correlated Subqueries, aggregation, and indexes. Our mechanized semantics, called HoTT SQL, is based on K-Relations and homotopy type theory, where we denote relations as mathematical functions from tuples to univalent types. We have implemented HoTTSQL in Coq, which takes only fewer than 300 lines of code and have proved a wide range of SQL rewrite rules, including those from database research literature (e.g., magic set rewrites) and real-world query optimizers (e.g., subquery elimination). Several of these rewrite rules have never been previously proven correct. In addition, while query equivalence is generally undecidable, we have implemented an automated decision procedure using HoTTSQL for conjunctive queries: a well studied decidable fragment of SQL that encompasses many real-world queries.

  • HoTTSQL: Proving Query Rewrites with Univalent SQL Semantics
    arXiv: Programming Languages, 2016
    Co-Authors: Shumo Chu, Konstantin Weitz, Alvin Cheung, Dan Suciu
    Abstract:

    Every database system contains a query optimizer that performs query rewrites. Unfortunately, developing query optimizers remains a highly challenging task. Part of the challenges comes from the intricacies and rich features of query languages, which makes reasoning about rewrite rules difficult. In this paper, we propose a machine-checkable denotational semantics for SQL, the de facto language for relational database, for rigorously validating rewrite rules. Unlike previously proposed semantics that are either non-mechanized or only cover a small amount of SQL language features, our semantics covers all major features of SQL, including bags, Correlated Subqueries, aggregation, and indexes. Our mechanized semantics, called HoTTSQL, is based on K-Relations and homotopy type theory, where we denote relations as mathematical functions from tuples to univalent types. We have implemented HoTTSQL in Coq, which takes only fewer than 300 lines of code and have proved a wide range of SQL rewrite rules, including those from database research literature (e.g., magic set rewrites) and real-world query optimizers (e.g., subquery elimination). Several of these rewrite rules have never been previously proven correct. In addition, while query equivalence is generally undecidable, we have implemented an automated decision procedure using HoTTSQL for conjunctive queries: a well-studied decidable fragment of SQL that encompasses many real-world queries.

Piotr Synak - One of the best experts on this subject based on the ideXlab platform.

  • Proceedings of the 2013 Federated Conference on Computer Science and Information Systems (FedCSIS) - Enhanced rough SQL for Correlated Subqueries
    2013
    Co-Authors: Marcin Kowalski, Dominik Slezak, Piotr Synak
    Abstract:

    We discuss some enhancements of approximate SQL extensions available in Infobright's database technology. We explain how these new enhancements can speed up execution of complex Correlated sub-queries, which are quite popular in advanced database applications. We compare our research to the state-of-the-art solutions in the area of analytic databases. We also show in what sense our technology follows the principles of rough sets and granular computing.

  • enhanced rough sql for Correlated Subqueries
    Federated Conference on Computer Science and Information Systems, 2013
    Co-Authors: Marcin Kowalski, Dominik Slezak, Piotr Synak
    Abstract:

    We discuss some enhancements of approximate SQL extensions available in Infobright's database technology. We explain how these new enhancements can speed up execution of complex Correlated sub-queries, which are quite popular in advanced database applications. We compare our research to the state-of-the-art solutions in the area of analytic databases. We also show in what sense our technology follows the principles of rough sets and granular computing.

  • A Rough-Columnar RDBMS Engine - A Case Study of Correlated Subqueries
    IEEE Transactions on Knowledge and Data Engineering, 2012
    Co-Authors: Dominik Ślęzak, Piotr Synak, Janusz Borkowski, Jakub Wróblewski, Graham Toppin
    Abstract:

    Columnar databases provide a number of benefits with regard to both data storage (e.g.: data compression) and data processing (e.g.: optimized data access, parallelized decompression, lazy materialization of intermediate results). Their characteristics are particularly advantageous for exploratory sessions and ad hoc analytics. The principles of columnar stores can be also combined with a pipelined and iterative processing, leading toward modern analytic engines able to handle large, rapidly growing data sets. In this paper, we show how to further enrich such a framework by employing metadata layers aimed at minimizing the need of data access. In particular, we discuss the current implementation and the future roadmap for Correlated Subqueries in Infobright’s RDBMS, where all above-mentioned architectural features interact with each other in order to improve the query execution.

Hamid Pirahesh - One of the best experts on this subject based on the ideXlab platform.

  • SIGMOD Conference - WinMagic: subquery elimination using window aggregation
    Proceedings of the 2003 ACM SIGMOD international conference on on Management of data - SIGMOD '03, 2003
    Co-Authors: Calisto Zuzarte, Hamid Pirahesh, Qi Cheng, Linqi Liu, Kwai Wong
    Abstract:

    Database queries often take the form of Correlated SQL queries. Correlation refers to the use of values from the outer query block to compute the inner subquery. This is a convenient paradigm for SQL programmers and closely mimics a function invocation paradigm in a typical computer programming language. Queries with Correlated Subqueries are also often created by SQL generators that translate queries from application domain-specific languages into SQL. Another significant class of queries that use this Correlated subquery form is that involving temporal databases using SQL. Performance of these queries is an important consideration particularly in large databases. Several proposals to improve the performance of SQL queries containing Correlated Subqueries can be found in database literature. One of the main ideas in many of these proposals is to suitably decorrelate the subquery internally to avoid a tuple-at-a-time invocation of the subquery. Magic decorrelation is one method that has been successfully used. Another proposal is to cache the portion of the subquery that is invariant with the changing values of the outer query block. What we propose here is a new technique to handle some typical Correlated queries. We go a step further than to simply decorrelate the subquery. By making use of extended window aggregation capabilities, we eliminate redundant access to common tables referenced in the outer query block and the subquery. This technique can be exploited even for non-Correlated Subqueries. It is possible to get a huge boost in performance for queries that can exploit this technique, which we call WinMagic. This technique was implemented in IBM® DB2® Universal Database" Version 7 and Version 8. In addition to improving DB2 customer queries that contain aggregation Subqueries, it has provided significant improvements in a number of TPCH benchmarks that IBM has published since late in 2001.

  • complex query decorrelation
    International Conference on Data Engineering, 1996
    Co-Authors: Praveen Seshadri, Hamid Pirahesh, T.y.c. Leung
    Abstract:

    Complex queries used in decision support applications use multiple Correlated Subqueries and table expressions, possibly across several levels of nesting. It is usually inefficient to directly execute a Correlated query; consequently, algorithms have been proposed to decorrelate the query, i.e. to eliminate the correlation by rewriting the query. This paper explains the issues involved in decorrelation, and surveys existing algorithms. It presents an efficient and flexible algorithm called magic decorrelation which is superior to existing algorithms both in terms of the generality of application, and the efficiency of the rewritten query. The algorithm is described in the context of its implementation in the Starburst Extensible Database System, and its performance is compared with other decorrelation techniques. The paper also explains why magic decorrelation is not merely applicable, but crucial in a parallel database system.

  • ICDE - Complex query decorrelation
    Proceedings of the Twelfth International Conference on Data Engineering, 1
    Co-Authors: Praveen Seshadri, Hamid Pirahesh, T.y.c. Leung
    Abstract:

    Complex queries used in decision support applications use multiple Correlated Subqueries and table expressions, possibly across several levels of nesting. It is usually inefficient to directly execute a Correlated query; consequently, algorithms have been proposed to decorrelate the query, i.e. to eliminate the correlation by rewriting the query. This paper explains the issues involved in decorrelation, and surveys existing algorithms. It presents an efficient and flexible algorithm called magic decorrelation which is superior to existing algorithms both in terms of the generality of application, and the efficiency of the rewritten query. The algorithm is described in the context of its implementation in the Starburst Extensible Database System, and its performance is compared with other decorrelation techniques. The paper also explains why magic decorrelation is not merely applicable, but crucial in a parallel database system.

Praveen Seshadri - One of the best experts on this subject based on the ideXlab platform.

  • complex query decorrelation
    International Conference on Data Engineering, 1996
    Co-Authors: Praveen Seshadri, Hamid Pirahesh, T.y.c. Leung
    Abstract:

    Complex queries used in decision support applications use multiple Correlated Subqueries and table expressions, possibly across several levels of nesting. It is usually inefficient to directly execute a Correlated query; consequently, algorithms have been proposed to decorrelate the query, i.e. to eliminate the correlation by rewriting the query. This paper explains the issues involved in decorrelation, and surveys existing algorithms. It presents an efficient and flexible algorithm called magic decorrelation which is superior to existing algorithms both in terms of the generality of application, and the efficiency of the rewritten query. The algorithm is described in the context of its implementation in the Starburst Extensible Database System, and its performance is compared with other decorrelation techniques. The paper also explains why magic decorrelation is not merely applicable, but crucial in a parallel database system.

  • ICDE - Complex query decorrelation
    Proceedings of the Twelfth International Conference on Data Engineering, 1
    Co-Authors: Praveen Seshadri, Hamid Pirahesh, T.y.c. Leung
    Abstract:

    Complex queries used in decision support applications use multiple Correlated Subqueries and table expressions, possibly across several levels of nesting. It is usually inefficient to directly execute a Correlated query; consequently, algorithms have been proposed to decorrelate the query, i.e. to eliminate the correlation by rewriting the query. This paper explains the issues involved in decorrelation, and surveys existing algorithms. It presents an efficient and flexible algorithm called magic decorrelation which is superior to existing algorithms both in terms of the generality of application, and the efficiency of the rewritten query. The algorithm is described in the context of its implementation in the Starburst Extensible Database System, and its performance is compared with other decorrelation techniques. The paper also explains why magic decorrelation is not merely applicable, but crucial in a parallel database system.