Leveraging Application Data Constraints to Optimize Database-Backed Web Applications

05/05/2022
by   Xiaoxuan Liu, et al.
0

Exploiting the relationships among data, such as primary and foreign keys, is a classical query optimization technique. As persistent data is increasingly being created and maintained programmatically (e.g., web applications), prior work that focuses on inferring data relationships by tabulating statistics from the stored data misses an important opportunity. We present ConstrOpt, the first tool that identifies data relationships by analyzing the programs that generate and maintain the persistent data. Once identified, ConstrOpt leverages the found constraints to optimize the application's physical design and query execution by rewriting queries. Instead of developing a fixed set of predefined rewriting rules, ConstrOpt employs an enumerate-test-verify technique to automatically exploit the discovered data constraints to improve query execution. Each resulting rewrite is provably semantically equivalent to the original query. Using 14 real-world web applications, our experiments show that ConstrOpt can discover over 4306 data constraints by analyzing application source code. On 3 of the evaluated applications, among queries with at least one constrained column, 42 are optimized by changing the application code. Finally, ConstrOpt's constraint-driven optimizer improves the performance of 826 queries, 9.8 which has over 2x speedup.

READ FULL TEXT
research
03/16/2020

Equivalent Rewritings on Path Views with Binding Patterns

A view with a binding pattern is a parameterized query on a database. Su...
research
03/27/2023

Learned Query Superoptimization

Traditional query optimizers are designed to be fast and stateless: each...
research
05/13/2022

Blockaid: Data Access Policy Enforcement for Web Applications

Modern web applications serve large amounts of sensitive user data, acce...
research
05/10/2022

Cognitive Visual-learning Environment for PostgreSQL

PostgreSQL is an object-relational database (ORDBMS) that was introduced...
research
02/12/2021

Updatable Materialization of Approximate Constraints

Modern big data applications integrate data from various sources. As a r...
research
07/06/2023

Scaling Package Queries to a Billion Tuples via Hierarchical Partitioning and Customized Optimization

A package query returns a package - a multiset of tuples - that maximize...
research
05/30/2020

A Novel Approach for Generating SPARQL Queries from RDF Graphs

This work is done as part of a research master's thesis project. The goa...

Please sign up or login with your details

Forgot password? Click here to reset