ta表有十万条记录,
tb表有两千万条记录,node上无索引。
在执行计划中看到的是哈希连接sql:
select t.* from ta t
where exists ( select /*+ parallel( b,2) */ * from tb b
where b.flag=0
and b.day_id between 20110301 and 20110331
and b.node=t.node ) 并行度明明提示是2,为何我看到有4个进程在跑??为什么??
tb表有两千万条记录,node上无索引。
在执行计划中看到的是哈希连接sql:
select t.* from ta t
where exists ( select /*+ parallel( b,2) */ * from tb b
where b.flag=0
and b.day_id between 20110301 and 20110331
and b.node=t.node ) 并行度明明提示是2,为何我看到有4个进程在跑??为什么??
你可以把
select /*+ parallel( b,2) */ * from tb b
where b.flag=0
and b.day_id between 20110301 and 20110331
这个语句单独拿出来试试看。