码迷,mamicode.com
首页 > 数据库 > 详细

oracle hint

时间:2018-01-22 11:59:52      阅读:166      评论:0      收藏:0      [点我收藏+]

标签:mod   count   2-2   tail   否则   nbsp   hive   ring   int   

 

sample 1:

  1.   
[sql] view plain copy
 
  1. select /*+INDEX(t IDX_SEL_ADD_DATE)*/ t.own_sys, count(1)  
  2.  from std_entp_login t  
  3. where t.add_date >  
  4.               to_date(‘2010-12-28 00:00:00‘, ‘yyyy-mm-dd hh24:mi:ss‘)  
  5.           and t.add_date <  
  6.               to_date(‘2010-12-28 23:59:59‘, ‘yyyy-mm-dd hh24:mi:ss‘)  
  7. group by t.own_sys  

 


用到别名时,/*+INDEX(TABLE INDEX_NAME)*/中的TABLE一定是别名,否则不走执行强制索引。

 

 

ref

http://www.cnblogs.com/ebs-blog/archive/2011/09/05/2167730.html

oracle hint

标签:mod   count   2-2   tail   否则   nbsp   hive   ring   int   

原文地址:https://www.cnblogs.com/feiyun8616/p/8328219.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!