RPD(翻译) - Using Hints in SQL Statements

浏览: 1949

Using Hints in SQL Statements 

在SQL语句中使用提示

Hints are instructions that you place within a SQL statement that tell the data source query optimizer the most efficient way to execute the statement.

提示是你写在SQL语句中的指引,其可以指导数据源查询优化器根据更有效率的方式去执行语句。

Hints override the optimizer's execution plan, so you can use hints to improve performance by forcing the optimizer to use a more efficient plan. Hints are only supported for Oracle Database data sources.

提示重写了优化器的执行计划,所以你可以通过提示强制优化器使用更有效的计划来提升性能。提示仅有甲骨文数据库支持。

Using the Administration Tool, you can add hints to a repository, in both online and offline modes, to optimize the performance of queries. When you add a hint to the repository, you associate it with Physical layer objects. When the object associated with the hint is queried, the Oracle BI Server inserts the hint into the SQL statement.

使用管理工具,你可以添加提示到资料库中,无论是联机还是脱机模式,达到提升查询性能的目的。当你添加提示到资料库中时,你将其关联到物理层的对象。当含有提示的对象被查询,BI服务会将提示插入到SQL语句中。

Table 8-6 shows the physical objects with which you can associate hints. It also shows the Administration Tool dialog that corresponds to the physical object. Each of these dialogs contains a Hint field, into which you can type a hint to add it to the repository.

下图展示的是可以关联提示的物理对象。同时展示的是设置相应物理对象的管理工具界面。每个界面均包含一个提示域,你可以写入提示到资料库中。

Table 8-6 Physical Layer Objects That Accept Hints



Hints are only supported when the Table Type is set to Physical Table. For other table types, the hint text is ignored. For physical tables with a table type of Select, you can provide the hint text as part of the SQL statement entered in the Default Initialization String field.

提示仅支持物理表。对于其他表类型,提示即便设置了也是被忽略的。对于Select类型的物理表,你可以直接在初始化字符串域中的SQL语句使用提示。

推荐 1
本文由 wffger 创作,采用 知识共享署名-相同方式共享 3.0 中国大陆许可协议 进行许可。
转载、引用前需联系作者,并署名作者且注明文章出处。
本站文章版权归原作者及原出处所有 。内容为作者个人观点, 并不代表本站赞同其观点和对其真实性负责。本站是一个个人学习交流的平台,并不用于任何商业目的,如果有任何问题,请及时联系我们,我们将根据著作权人的要求,立即更正或者删除有关内容。本站拥有对此声明的最终解释权。

0 个评论

要回复文章请先登录注册