首页> 外国专利> Optimizing database queries using reusable subqueries

Optimizing database queries using reusable subqueries

机译:使用可重用子查询优化数据库查询

摘要

A database system optimizes database queries that comprise subqueries. The database system factors out computation from two or more subqueries to a reusable subquery. The reusable subquery returns a result set. The subqueries are rewritten to use the result set and the database query modified to use the rewritten subqueries. The modified database query performs efficiently since the result set is computed only once for each subquery that uses the reusable query. The database system also composes nested subqueries that compute aggregate values. The database system identifies an inner subquery nested within an outer subquery, each subquery computing an aggregate value. The database system determines a new aggregate function corresponding to a composition of aggregate functions of the inner and the outer queries. The database system determines a composed query using the inner query with the outer query. The composed query uses the new aggregate function.
机译:数据库系统优化了包含子查询的数据库查询。数据库系统将计算从两个或多个子查询排除到可重用子查询中。可重用子查询返回结果集。子查询被重写为使用结果集,而数据库查询被修改为使用重写的子查询。修改后的数据库查询可以高效地执行,因为对于使用可重用查询的每个子查询,结果集仅计算一次。数据库系统还包含计算聚合值的嵌套子查询。数据库系统标识嵌套在外部子查询中的内部子查询,每个子查询计算一个聚合值。数据库系统确定与内部查询和外部查询的聚合函数的组成相对应的新聚合函数。数据库系统使用内部查询和外部查询来确定组合查询。组合查询使用新的聚合函数。

著录项

相似文献

  • 专利
  • 外文文献
  • 中文文献
获取专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号