The true solution to this problem is to improve the access plan for problematic SQL statements by adding the correct indexes.
这个问题的正确解决方案是通过添加正确的索引改进有问题的sql语句的存取方案。
However, application logic still needs to encode the details of SQL and access protocol.
然而,应用程序逻辑仍然需要编码SQL和访问协议的详细信息。
The implementation contains methods encapsulating all required SQL statements for data access and manipulation.
该实现包含封装所有用于数据访问和操纵的sql语句的方法。
Federated procedures with access level MODIFIES SQL DATA cannot be invoked inside triggers, dynamic compound statements, scalar, table, row functions, and methods.
在触发器、动态合成语句、标量、表、行函数和方法中不能调用具有访问级别MODIFIESSQLDATA的联邦过程。
As the previous section described, parameter marker usage in SQL statements fosters access plan reuse.
如上节所述,sql语句中的参数标记使用可促进访问计划重用。
Whether used together with access to SQL tables or used separately, this can greatly simplify application development.
无论是与对sql表的访问一起使用,还是单独使用,这都可以大大简化应用程序开发。
As just described, if you can't find a DB2 equivalent function, you can rewrite your SQL to access data a different way.
根据以上所述,如果找不到DB 2中具有相同功能的函数,那么可以重写SQL,以不同的方式访问数据。
When you write SQL statements that access DB2 data, be sure to follow these three guidelines for coding SQL for performance.
当您编写访问DB2数据的sql语句时,要确保遵循以下三个编码sQL的准则以获得最佳性能。
By supporting parameterized statements, you exploit the advanced features provided by these, like access path reuse and SQL injection prevention.
由于支持参数化语句,您可以利用这种语句提供的高级特性,例如访问路径重用和SQL注入预防。
Applications with direct JDBC access use SQL to define the queries and rely on custom code to map the result set data back to the actual business objects.
具有直接JDBC访问功能的应用程序使用SQL定义查询,并且依靠自定义代码将结果集数据映射回到实际业务对象。
IBM I customers, worldwide, are now using SQL to define and access data.
如今,全世界IBMi客户都在使用SQL定义和访问数据。
Lastly, it provides direct SQL access to JDBC sources, though you should avoid these tags if you're trying to separate the UI and logic.
最后,它还提供了对jdbc源的SQL访问功能,不过如果您试图将UI和业务逻辑分隔开,就应该避免使用这些标签。
The SQL explain facility provides detailed information about the access plan that the query optimizer chooses for an SQL statement.
SQL解释工具提供查询优化器为 SQL语句所选择的访问计划的有关详细信息。
If some of the top SQL statements are considered unexpectedly expensive, further action is required to analyze the SQL access plan to see if anything can be improved.
如果其中一些最优sql语句被认为是异常昂贵的,下一步将需要分析SQL访问计划,看看是否还可以改进。
Always use literals if the optimal access plan for the SQL statement varies according to the literals in the filter conditions.
如果sql语句的最优访问计划根据过滤条件中的文本变化,则应总是使用文本。
Before beginning this tutorial, you should be familiar with the concept of an SQL access plan.
在开始本教程之前,您应该熟悉SQL访问计划的概念。
You'll also need to learn how best to write these SQL statements, and how to discover the access paths DB2 chose to satisfy your SQL requests.
您还需要学习如何最好地编写这些SQL语句以及如何发现DB2选择的存取路径来满足您的 SQL请求。
SQL commands to perform database access.
执行数据库访问的SQL命令。
Bind is the process that saves the access plan associated with a SQL statement into a DB2 SQL package.
绑定过程将与一个sql语句相关联的访问计划保存到一个DB 2 sql包中。
To enable access plan reuse, rewrite the SQL statement using a parameter marker, as shown in Listing 3.
要实现访问计划重用,使用一个参数标记重写SQL语句,如 清单3 所示。
A simple program architecture would naturally mix the business logic with data access logic (like SQL).
简单的程序体系结构会自然地将业务逻辑和数据访问逻辑(如sql)混合。
Ensure that the proper SQL services are running on the SQL server to allow remote access to the SQL instance.
确认在SQL服务器上运行了合适的SQL服务以支持对SQL实例的远程访问。
The best access plan for the SQL statement does not depend on explicit values in the statement's filter conditions.
此sql语句的最佳访问计划不取决于该语句的过滤条件中的显式值。
For instance, you may rarely, if ever, be required to analyze the access plans for SQL statements.
例如,您可能很少被要求分析sql语句的访问计划。
The SQL compiler USES query optimization to select the best performing access path for any given SQL statement (within a reasonable amount of time, of course).
SQL编译器使用查询优化来为任何给定的sql语句选择表现最好的访问路径(当然,这要在合理的时间内)。
Indexes that will provide index-only access for the SQL statement.
为sql语句提供进索引访问的索引。
SQL procedures are written entirely in SQL and allow access to DB2 resources via SQL operations.
SQL过程是完全用 SQL编写的,可以通过 SQL操作访问DB2资源。
In addition, any bugs that occur when the SQL schema doesn't match the database access code are all but eliminated because the generator builds both the SQL schema and the access code.
此外,由于SQL架构与数据库访问代码不匹配造成的缺陷也可以完全避免,因为SQL架构和访问代码都是由生成器建立的。
Users can access this data with simple SQL containing a time period specification.
用户可以使用包含一个时间区间的简单SQL 来访问这个数据。
Briefly, an access plan is the set of steps that DB2 USES to execute a SQL statement and access data.
简单地说,访问计划是DB2用来执行sql语句和访问数据的一组步骤。
应用推荐