此外,还将讨论优化器的角色,其中包括OPTCOMPIND参数、查询命令和内部统计数据。
In addition, it discusses the role of the optimizer, including the OPTCOMPIND parameter, query directives, and internal statistics.
优化器的行为受三个关键因素的影响:Informix配置文件中OPTCOMPIND参数的值、查询命令和内部统计数据的准确性。
The behavior of the optimizer is influenced by three key factors: the value of OPTCOMPIND parameter in the Informix configuration file, query directives, and the accuracy of internal statistics.
一旦理解了自己的选择,就可以通过调整OPTCOMPIND参数,或者通过添加查询指示或索引,来影响优化器,从而选择最佳的查询执行计划。
Once you understand your options, you can influence the optimizer to select the best query execution plan, either by adjusting the OPTCOMPIND parameter or by adding query directives or indexes.
例如,优化器到执行时才会知道主机变量或参数标记的值(如果查询中包含的话)。
For example, the optimizer does not know the values of host variables or parameter markers (if these are contained in the query) until the query is executed.
注意:当索引表达式被用于关系表达式,或作为某个操作符类函数的参数时,查询优化器将考虑使用函数索引。
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.
通常,数据库问题可能是指由数据库导致的任何瓶颈问题,包括SQL查询、数据库优化参数、索引问题和数据分布问题。
Generally, database problems can refer to any bottleneck due to database, including SQL queries, database tuning parameters, indexing issues, and data distribution problems.
参数化查询的主要性能好处是优化器可以制定在重复执行语句时能够再使用的存取路径。
The key performance benefit of parameterized queries is that the optimizer can formulate an access path that can be reused over repeated executions of the statement.
参数化查询的主要性能好处是优化器可以制定在重复执行语句时能够再使用的存取路径。
The key performance benefit of parameterized queries is that the optimizer can formulate an access path that can be reused over repeated executions of the statement.
应用推荐