Exploiting the relationships among data is a classical query optimization technique. As persistent data is increasingly being created and maintained programmatically, prior work that infers data relationships from data statistics misses an important opportunity. We present ConstrOpt, the first tool that identifies data relationships by analyzing database-backed applications. Once identified, ConstrOpt leverages the constraints to optimize the application's physical design and query execution. 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 equivalent to the original query. Using 14 real-world web applications, our experiments show that ConstrOpt can discover numerous data constraints from code analysis and improve real-world application performance significantly.
翻译:利用数据之间的关系是一种古典查询优化技术。随着持续数据日益在方案上建立和维持,从数据统计中推断数据关系的先前工作失去了一个重要机会。我们介绍了第一个通过分析数据库支持的应用来确定数据关系的工具Constropt。一旦发现,Constropt利用各种制约因素优化了应用程序的物理设计和查询执行。Constropt没有制定一套固定的预先定义的重写规则,而是使用一个点数测试技术,自动利用已发现的数据限制来改进查询执行。每个由此得出的重写都与原始查询相当。我们利用14个真实世界的网络应用,实验显示Constropt可以从代码分析中发现许多数据限制,并显著改善真实世界应用的绩效。