为了执行XML查询,DB 29引入了三个新的内部查询操作符,名为XSCAN、XISCAN和XANDOR。
To execute XML queries, DB2 9 introduces three new internal query operators called XSCAN, XISCAN, and XANDOR.
还记得吗,每个ship操作符都意味着在执行计划中有一个地方要将一个查询或请求转发到一个远程数据源。
Recall that each SHIP operator indicates a point in the execution plan at which a query or request is sent to a remote data source.
其余的两个区域提供了关于访问计划的每个操作符以及查询所使用的表和/或索引的细节。
The remaining two sections provide details on each operator of the access plan, and the tables and/or indexes used by the query.
检查每个远程操作符是否包含在理论上可由给定数据源计算的查询中的最大部分。
Check to see if each remote operator contains the maximum portion of the query that can theoretically be evaluated by a given data source.
要使用表子查询,需要使用SQL操作符将嵌入式查询与布尔表达式组合在一起。
To use a table subquery, you need to use an SQL operator to combine the embedded query with a Boolean expression.
SHIP3操作符包含一个语句,该语句表明标量子查询的结果放在一个主机变量中。
The SHIP3 operator contains the statement that shows the result of the scalar subquery being bound in as a host variable.
注意:当索引表达式被用于关系表达式,或作为某个操作符类函数的参数时,查询优化器将考虑使用函数索引。
Note: the query optimizer considers using a functional index when the index expression is used in a relational expression or as an argument to one of the operator class functions.
另外,DB 2可以利用新的查询和联结操作符以及新的索引处理技术,为涉及XML文档的查询提供更好的运行时性能。
In addition, DB2 can leverage new query and join operators, as well as new index processing techniques, to provide strong runtime performance for queries involving XML documents.
如果运行清单6中最后的查询(如上面所示),这么在访问计划中应该可以看到,DB 2决定通过EISCAN操作符使用扩展的索引。
If you run the final query from Listing 6, as it is shown above, you should see in the access plan that DB2 decides to use the extended index by the EISCAN operator.
在某些环境下,优化器不能将一个ATQ 放在一个SHIP操作符之上,因为这样会改变查询的语义。
Under certain circumstances,it is not possible for the optimizer to place an ATQ above a SHIP operator because doing so changes the semantics of the query.
比较图4和图5中的访问计划,会发现对于EISCAN操作符,查询使用了一个扩展索引。
Comparing the access plans in Figure 4 and Figure 5 shows again with the EISCAN operator that an extended index is used by the query.
在这些情况下,SHIP操作符将保持同步,以维持查询的语义。
In these cases, the SHIP operator will remain synchronous in order to maintain the semantics of the query.
替换操作符确保恶意脚本不能将SQL附加到查询中覆盖现有代码,访问它们不应该看到的数据。
Replacement operators ensure that malicious scripts can't append SQL into queries to override the existing code and get access to data that they shouldn't see.
包含远程语句的SHIP操作符表明要远程处理查询中的一部分。
Recall that a SHIP operator containing a remote statement indicates a portion of the query that is to be processed remotely.
清单1显示了如果利用布尔操作符进行查询的过程。
Listing 1 shows the process of doing searches with Boolean operators.
对于SELECT查询,远程sql语句中的文本可以在查询执行计划中与SHIP操作符相关的细节中找到。
For SELECT queries, the text of the remote SQL statement can be found in the details associated with the SHIP operator in the query execution plan.
请参阅SPARQL的规范,详细学习SPARQL的内置函数、操作符、查询格式和语法,或者参阅更多SPARQL查询示例。
Look at the SPARQL spec to learn in detail about SPARQL's built-in functions, operators, query forms, and syntax, or to see many more example SPARQL queries.
XML查询计算:执行计划和新操作符。
要查明具有特权的所有帐号,可以查询每个系统编目视图并使用UNION操作符将结果组合在一起,如清单4所示。
To find out all accounts with privileges, you can query each of the system catalog views and combine the results together using the UNION operator, as shown in Listing 4.
由最左边的SHIP操作符封装的远程查询被转发到存放US. sales表的远程数据源上。
The remote query encapsulated by the leftmost SHIP operator is sent to the remote data source at which the US.Sales table resides.
图4展示了一个在联邦服务器使用嵌套循环连接操作符来计算这个查询的计划。
Figure 4 shows a plan using the nested loop join operations at the federated server to evaluate this query.
如果有异步,那么当主查询开始时,所有在它们的上一层有at Q操作符的SHIP也随之开始。
With asynchrony, all SHIPs with an ATQ operator directly above them would start at the same time as the main query starts.
在IICE查询语言中,通配符由 ‘*’(多个字符)和 ‘?’ (单个字符)表示,只能在全文或属性搜索中与LIKE 操作符一起使用。
Wildcards, represented by '*' (multiple characters) and '?' (a single character) in the II CE query language, can only be used with the LIKE operator in either a full-text or a property search.
这些操作符会被嵌套在括号中并与其他的查询语言操作符混合在一起吗?
Can these operators be nested in parenthesis and mixed with the other query language operators?
就我们此处的目的而言,只要理解异步是通过优化器明智地放置TQ(表队列)操作符而引入到联邦查询计划之中的就足够了。
For our purposes, it suffices to understand that asynchrony is introduced into a federated query plan by the optimizer's judicious placement of the TQ (Table Queue) operator.
将操作符类与访问方法结合使用,可以指定创建索引和优化查询时使用的操作符。
An operator class is used in conjunction with the access method to specify the operators used for building the index and during query optimization.
对于使用了昵称的INSERT、UPDATE和DELETE查询,在某些情况下(后面会解释),所有工作可能都是由远程数据源来做,而在FQEP中没有ship操作符。
For INSERT, UPDATE, and DELETE queries involving nicknames, in some cases (explained below), all the work might be done by the remote data source, and a SHIP operator will not be found in the FQEP.
RETURN操作符将完成查询执行,并将查型结果返回到API。
The return operator completes the query execution and returns the query result to the API.
可以通过使用Boolean AND操作符将这两个查询限制组合在该查询中。
These two query restrictions are combined in this query by using the Boolean AND operator.
可以通过使用Boolean AND操作符将这两个查询限制组合在该查询中。
These two query restrictions are combined in this query by using the Boolean AND operator.
应用推荐