请问下 select /*+parallel(a,4)*/ * from  A表;
是什么意思阿?要是要使用索引的话 应该是
select /*+索引名 */
还是 
select /*+index (索引名) */  呢 就是这样的知识哪里有讲解呢 ,我百度了半天都找不到.....

解决方案 »

  1.   

    如果你要用索引的话,语法如下:
    select /*+ (tt index_name) */ from my_table tt当然,括号中的tt也可用表的名字替换。这方面的知识请参看oracle公司的:Database Performance Tuning Guide and Reference
      

  2.   

    忘了说 select /*+parallel(a,4)*/ * from  A表; 的意思了:这句话的意思就是从A表检索数据的时候,使用4个并行(specifies the degree of parallelism for the given table),一定要注意的是,你上面语句中括号中的写法有点小问题,在并行的hint中,必须使用alias才会起作用,也就是说,一定要这么用:
    select /*+ parallel(a,4) */ * from my_table a