首页> 外国专利> Dropping tautological predicates from SQL queries for reusability

Dropping tautological predicates from SQL queries for reusability

机译:从SQL查询中删除重言式谓词以实现可重用性

摘要

A database query optimizer creates a main access plan for a query, and also creates one or more subplans for the same query. The subplans are used in executing a query. When a subplan is generated, all tautological predicates (i.e., predicates that do not narrow the query) are dropped, thereby enhancing the reusability of stored subplans. When a query is processed, its tautological predicates are dropped, and if a subplan for the query with the dropped tautological predicates is found, the subplan is used to execute the query. If the query to be run has no main access plan in the cache, a main access plan is generated, and a subplan is also generated that corresponds to the query to be run, with all tautological predicates dropped. The same query may thus generate many subplans, enhancing the reusability of the query by storing each subplan in the access plan cache.
机译:数据库查询优化器为查询创建主访问计划,并且还为同一查询创建一个或多个子计划。子计划用于执行查询。生成子计划时,将删除所有重言式谓词(即不会缩小查询范围的谓词),从而增强已存储子计划的可重用性。处理查询时,将删除其重言谓语,如果找到了带有已删除重言语谓词的查询子计划,则该子计划将用于执行查询。如果要运行的查询在缓存中没有主访问计划,则会生成一个主访问计划,并且还会生成一个子计划,该子计划与要运行的查询相对应,而所有重言式谓词都将被丢弃。因此,同一查询可以生成许多子计划,通过将每个子计划存储在访问计划缓存中来增强查询的可重用性。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号