Stephen, The old problem. You are relying on a specific order of execution of the predicates. Oracle is perfectly in its right to calculate (a.elapsed_time/(1000000*a.executions)) > 5 before a.executions > 0 after all, "and" is commutative. stephen booth wrote: > > > I ran it on 9206 on Solaris. That error is basically saying that > a.executions=0. Thing is the preceding part of the where clause is > a.executions>0 so there should be no way a.executions=0. The only > thing that comes to mind is that Oracle is trying to evaluate the > "(a.elapsed_time/(1000000*a.executions)) > 5" before the "a.executions > -- Regards Wolfgang Breitling Centrex Consulting Corporation www.centrexcc.com -- //www.freelists.org/webpage/oracle-l