首页> 外国专利> Method of optimizing SQL queries where a predicate matches nullable operands

Method of optimizing SQL queries where a predicate matches nullable operands

机译:谓词与可为空的操作数匹配的SQL查询的优化方法

摘要

An optimization technique for SQL queries, a program storage device storing the optimization program, and an apparatus for optimizing a query is provided. A query is analyzed to determine whether it includes a predicate for matching nullable operands and, if so, it is transformed to return TRUE when all operands are NULLs. If the DBMS supports this new function, the predicate is marked. If not, the predicate is re-written into a CASE expression having two SELECT clauses. The query is then executed in the computer to efficiently retrieve data from the relational database.
机译:提供了一种用于SQL查询的优化技术,存储该优化程序的程序存储设备以及用于优化查询的设备。分析查询以确定它是否包含用于匹配可为空的操作数的谓词,如果是,则将其转换为在所有操作数均为NULL时返回TRUE。如果DBMS支持此新功能,则标记谓词。如果不是,则将该谓词重写为具有两个SELECT子句的CASE表达式。然后在计算机中执行查询以有效地从关系数据库中检索数据。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号