发明名称 Rewrite Constraints For Database Queries
摘要 A database system rewrites database queries based on rewrite constraints specification. The rewrite constraints specification provides directives to the database system to generate temporary tables for storing intermediate results of database queries and rewrite the corresponding database queries in terms of the temporary tables. The subqueries for matching the rewrite constraints specification may be specified in various ways. For example, the rewrite constraints specification may identify the subqueries by using one or more aliases. The rewrite constraints specification may specify a list of tables such that all database queries that join the database tables specified in the rewrite constraints specification are determined to match. The optimizer is able to optimize the rewritten database queries better by getting a better estimate for the statistics describing the temporary tables.
申请公布号 US2015149436(A1) 申请公布日期 2015.05.28
申请号 US201414538032 申请日期 2014.11.11
申请人 ParAccel LLC 发明人 McKenna William J.;Cole Richard L.;Chen Yijou;Perfilov Sergei;Sinha Aman;Szedenits, JR. Eugene
分类号 G06F17/30 主分类号 G06F17/30
代理机构 代理人
主权项 1. A computer-implemented method for rewriting database queries based on rewrite constraints specification, the method comprising: receiving a rewrite constraints specification identifying a subquery of a database query, wherein the subquery corresponds to an intermediate result relation generated during execution of the database query; matching the rewrite constraints specification with a set of database queries; determining that the rewrite constraints specification is applicable to a database query if the subquery identified in the rewrite constraints specification matches with at least a subquery of the database query; for each matching database query: generating a statement creating a temporary table for storing the intermediate result relation corresponding to the matching subquery, andrewriting the matching database query by replacing the matching subquery with the temporary table, andexecuting the rewritten database query.
地址 Campbell CA US