[quote]Ok. How to redesign the query?[/quote]For example, if this is a join, change it to a master query and a subquery.

Single join with many rows:
Code
select d.dname, e.ename
  from dept d, emp e
 where e.deptno = d.deptno
Master/subquery with fewer rows:
Code
select deptno, dname
  from dept

select ename
  from emp
 where depnto = :v_deptno


Marco Kalter
Allround Automations