Access plan creation in the prepare phase requires CPU resources.
准备阶段的访问计划创建需要CPU资源。
They abort and rollback the transaction if one or more participants failed in the prepare phase.
如果在准备阶段有一个或多个参与者失败,则终止或回滚该事务。
Therefore, time and CPU savings in the prepare phase is minimal even if parameter markers are used.
因此,即使使用参数标记,准备阶段的时间和CPU节约也很少。
Thus time and CPU resources are saved in the prepare phase when SQL statements are executed many times.
这样,当sql语句被多次执行时,准备阶段的时间和CPU资源将得以节约。
The time required for the prepare phase of the SQL statement makes up a significant portion of the statement's overall execution time.
准备阶段需要的时间占语句总执行时间的很大一部分。
The DB2 optimizer stores the access plan created in the prepare phase in the SQL statement cache (also called package cache in DB2) for reuse purposes.
DB 2优化器将准备阶段中创建的访问计划存储在sql语句缓存(在DB 2中也称为包缓存)中以便重用。
For this example query, it would be better to use literals instead of parameter markers and to accept the repeated prepare phase, as shown in Listing 7.
对于这个示例查询,最好使用文本而不是参数标记,并接受重复的准备阶段,如清单7所示。
Because the DB2 optimizer does not know the values of the parameter markers in the prepare phase, a one-size-fits-all access plan is generated that cannot be optimal in all cases.
由于DB 2优化器在准备阶段不知道参数标记的值,因此生成了一个在所有情况下都不是最优的万能(one - size - fits - all)访问计划。
Avoiding the prepare phase especially pays off if an SQL statement is executed many times and if the prepare phase makes up a significant portion of the statement's overall execution time.
避免准备阶段在下面两种情况下最有用:一是sql语句被多次执行;二是准备阶段需要的时间占语句总执行时间的很大一部分。
I typically name the phases the Prepare phase and the Accept phase.
我通常将阶段命名为准备阶段和接受阶段。
I typically name the phases the Prepare phase and the Accept phase.
我通常将阶段命名为准备阶段和接受阶段。
应用推荐