查询编译器主要可以执行两种类型的重写
使用Data透视图查询编译器。
图32:data透视图中的SQL查询编译器。
当提交该查询时,查询编译器会分析它的语法和语义。
When the query is submitted, its syntax and semantics are analyzed by the query compiler.
如果为cgtt表创建了索引,则查询编译器会将这些索引考虑在内。
If indexes are created on the CGTT table, the query compiler will take those indexes into account.
查询编译器在检查字符比较操作时使用该信息,以决定如何执行操作。
The query compiler uses this information while checking any character comparison operations, to decide how to evaluate the operations.
查询编译器将视图定义展开成主语句块,从而产生一个更复杂的语句。
The query compiler expands view definitions into the main statement block, which might result in a more complex statement.
联邦查询编译器作出一个基于成本的决策,并使得使用MQT的过程对用户是透明的。
The federated query compiler makes a cost-based decision and makes the process of using MQTs transparent to the users.
在pass - through会话中提交的sql语句和命令不会通过联邦查询编译器。
The SQL statements and commands submitted in a pass-through session do not go through the federated query compiler.
为了处理该查询,DB 2查询编译器查阅DB 2联邦数据库系统编目中的信息以及数据源包装器模块中的信息。
To process the query, the DB2 query compiler consults information in the DB2 federated database system catalog and the data source wrapper modules.
优化器或查询编译器领域中的其他问题,例如SQL 0901n错误或实例崩溃,也可以使用本文中所解释的方法来重新创建。
Other problems in the optimizer or query compiler area, such as SQL0901N errors or instance crashes, can also be recreated using the methods explained in this article.
许多备选MQT的存在可能会防止编译器为该查询选择最好的MQT。
The existence of many candidate MQTs might prevent the compiler from choosing the best MQT for that query.
当对SQL查询进行优化时,SQL 编译器所做出的决定会受到优化器的数据库内容模型的重大影响。
When optimizing SQL queries, the decisions made by the SQL compiler are heavily influenced by the optimizer's model of the database contents.
把该查询提交给SQL编译器之后,语义阶段展开视图定义,并将它合并到初始的查询中,如下所示。
After the query is submitted to the SQL compiler, the semantics phase expands the view definition and merges it into the original query as shown below.
优化器完成工作后,编译器将把查询计划转换为可执行的代码段,称为snippet。
After the optimizer has done its work, the compiler converts the query plan into executable code segments called snippets.
查询表达式基于编译器的模式转换,除了相关查询表达式需要的模式之外,你不必实现其它的;
Query expressions are based on compiler translations of patterns; you don't need to implement any more of the pattern than the relevant query expression requires
查询表达式中的变量都是强类型的,但许多情况下您不需要显式提供类型,因为编译器可以推断类型。
The variables in a query expression are all strongly typed, although in many cases you do not have to provide the type explicitly because the compiler can infer it.
查询表达式中的变量都是强类型的,但许多情况下您不需要显式提供类型,因为编译器可以推断类型。
The variables in a query expression are all strongly typed, although in many cases you do not have to provide the type explicitly because the compiler can infer it.
应用推荐