首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 冲浪宝典 > 网络资源 > Opt_param: a new optimizer hint for 10gR2
【标  题】:Opt_param: a new optimizer hint for 10gR2
【关键字】:Opt_param,new,optimizer,hint,for,10gR2
【来  源】:http://blog.csdn.net/jiawancai/archive/2007/02/27/1516344.aspx

Opt_param: a new optimizer hint for 10gR2

"OPT_PARAM" is a new optimizer hint introduced in 10gR2. This hint behaves the same way as setting a parameter (e.g, using alter session) but the effect is for the next statement only. Two IN params are the parameter and the parameter_value. If the parameter contains a numeric value, the parameter value has to be specified without quotes.

Syntax: opt_param(<parameter_name> [,] <parameter_value>).
For example:/*+ opt_param('hash_join_enabled','false') */


SQL> select empno from emp e, dept d where e.ename=d.dname
--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 8 | 160 | 7 (15)| 00:00:01 |
|* 1 | HASH JOIN | | 8 | 160 | 7 (15)| 00:00:01 |
| 2 | TABLE ACCESS FULL| DEPT | 4 | 40 | 3 (0)| 00:00:01 |
| 3 | TABLE ACCESS FULL| EMP | 28 | 280 | 3 (0)| 00:00:01 |
--------------------------------------------------------------------------

SQL> select /*+ opt_param('hash_join_enabled','false') */ empno from emp e, dept d where e.ename=d.dname;
--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 8 | 160 | 8 (25)| 00:00:01 |
| 1 | MERGE JOIN | | 8 | 160 | 8 (25)| 00:00:01 |
| 2 | SORT JOIN | | 4 | 40 | 4 (25)| 00:00:01 |
| 3 | TABLE ACCESS FULL| DEPT | 4 | 40 | 3 (0)| 00:00:01 |
|* 4 | SORT JOIN | | 28 | 280 | 4 (25)| 00:00:01 |
| 5 | TABLE ACCESS FULL| EMP | 28 | 280 | 3 (0)| 00:00:01 |  
浅谈查询优化器中的JOIN算法:【上一篇】
put your own progress information in V$SESSION_LONGOPS:【下一篇】
【相关文章】
  • Form表单中method="post/get'的区别
  • 使用SimpleDateFormat必须注意的问题
  • Clone和New哪个更快
  • M3G Performance Tips
  • New Windows Vista Includes ActiveSync
  • MsAjax Lib-> Array.forEach 函数
  • MsAjax Lib-> Date.format 函数
  • MsAjax Lib-> Date.localeFormat 函数
  • Pure GPU Computing Platform : NVIDIA CUDA Tutorial
  • Item 46. Forwarding Functions
  • 【随机文章】
  • Resin 1.2 重要源代码暴露漏洞
  • Win32 API 函数 (一)
  • 学用媒体播放器WMP
  • 软件操作界面设计须遵循的一些原则
  • 新病毒瞄准苹果电脑操作系统 16年净土化为乌有
  • 使用索引服务器 - 增加属性
  • BusyBox简化嵌入式Linux系统
  • VBScript LCase 函数
  • 6月18日, 小雨转晴
  • C语言编程中的常见问题
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 软讯网络 All Rigths Reserved.